Creates a new purchase order order line

Request Information

URI Parameters :

None.

Body Parameters :

purchase_order_details
NameDescriptionTypeAdditional information
id

Primary Key

globally unique identifier
purchase_order_id

Foreign key of the purchase_order

globally unique identifier

Optionally required : purchase_order_id, purchase_order_reference or purchase_order must be provided

purchase_order_reference_back_office

Embedded entity "purchase_order" using ERP PK when adding/updating

string

Optionally required : purchase_order_id, purchase_order_reference_back_office or purchase_order must be provided

purchase_order

Embedded entity "purchase_order" when adding/updating

purchase_order

Optionally required : purchase_order_id, purchase_order_reference_back_office or purchase_order must be provided

article_id

Foreign key of article

globally unique identifier

Optionally required : article_id, article_code or article must be provided

article_code

Embedded entity "article" using ERP PK when adding/updating

string

Optionally required : article_id, article_code or article must be provided

article

Embedded entity "article" when adding/updating

article

Optionally required : article_id, article_code or article must be provided

line_number

Line Number, auto filled with (Highest+1) if value is 0/null

integer
code

Code of the article (auto filled if empty)

string

Max length: 255

supplier_code

Code of the supplier for this article

string

Max length: 255

name

Article Name (will be auto filled if article.name+description are empty)

string

Max length: 255

description

Article description (will be auto filled by article.short_description if name+description are empty)

string

Max length: 255

price

Unit Price

decimal number

Matching regular expression pattern: ^[0-9]\d*(\.\d+)?$

Range: inclusive between 0.1 and 1.79769313486232E+308

quantity

Quantity

decimal number

Required

Range: inclusive between 0.1 and 1.79769313486232E+308

memo

Line memo/remark

string
cost_price

Unit Cost Price (statistic purpose)

decimal number

Matching regular expression pattern: ^[0-9]\d*(\.\d+)?$

reference_back_office

Field used for Embedded entity (store there your ERP PK)

string

Max length: 50

modified_dateutc

Readonly system field managed by database, filled with GetUtcDate when adding,updating

date

Request Formats :

application/json, text/json

Sample:
{
  "id": "620694d2-1532-41b3-8861-978d4ae0166b",
  "purchase_order_id": "91d5a0bc-26bd-48aa-b1c1-455a80fb40df",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "e982956f-6373-4952-a3ab-5a03e9e9d66c",
    "id2": 2,
    "jobs_id": "1de72d6e-2a30-4449-ae61-52a87f8d785c",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "72547379-ea76-4103-8472-38b8f3a83afd",
    "supplier_company_code": "sample string 6",
    "user_id": "40c487b7-2bbe-420e-a7d3-0f6a31a34170",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-08-19T05:38:32.7255381+00:00",
    "date_update": "2026-08-19T05:38:32.7255381+00:00",
    "date_delivery": "2026-08-19T05:38:32.7255381+00:00",
    "confirmed_date_delivery": "2026-08-19T05:38:32.7255381+00:00",
    "delivery_db_address_id": "aa97a7b8-18f7-4cf7-bf31-21a0d778548d",
    "approved_by_user_id": "113f6369-b6f8-4767-88cc-f27a33b57085",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "80596c9b-c864-47fa-8839-9781144eb682",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "0e8a21e1-3828-419c-8871-c95bf79a4132",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "91c50e52-dd34-43ce-a61c-87cb2166bbca",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-08-19T05:38:32.7255381+00:00"
  },
  "article_id": "846fccf2-2a08-42d2-9300-af68101772e6",
  "article_code": "sample string 5",
  "article": {
    "id": "36b7bc37-94a6-4a58-8433-98d9a0874ebd",
    "article_category_id": "c4cc16a2-e8df-4227-a5a9-d5b8cbfdb35f",
    "article_category": {
      "id": "7603da77-f154-4d43-9ff0-1dfff11cdb4e",
      "parent_id": "930bc84e-0501-422d-9e90-8fc840cb1f51",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-08-19T05:38:32.7255381+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "52d1703d-c71e-4f98-b978-6c2a7f90f6f4",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "aac4008c-91e5-4232-88fd-fc42761b96ee",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "84bf3e7f-37ea-45f1-bad7-ab9b448d90b4",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "63a79818-bf4f-441b-a16c-3cf7abe1aa10",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "6720df05-0912-44d6-a02b-be885ebbc730",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "4dfc220a-a786-4d1e-86fb-9750150979a7",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-08-19T05:38:32.7255381+00:00",
    "article_increment": 20,
    "min_article_quantity": 21,
    "entered_price": 22.0,
    "cost_price": 23.1,
    "no_stock": true,
    "archived": true,
    "is_travel_fee": true,
    "is_mileage_fee": true,
    "code": "sample string 28",
    "name": "sample string 29",
    "description_short": "sample string 30",
    "description_long": "sample string 31",
    "barcode": "sample string 32",
    "notes": "sample string 33",
    "date_create": "2026-08-19T05:38:32.7255381+00:00",
    "date_update": "2026-08-19T05:38:32.7255381+00:00",
    "modified_dateutc": "2026-08-19T05:38:32.7255381+00:00",
    "article_color_id": "14cceaa1-0c28-49ad-b075-350a45544f86",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "323f179e-b5ff-4eb9-8e00-46eb7f9f1120",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-08-19T05:38:32.7255381+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "fbce445e-b304-4ccb-ac1f-9de99197d2c0",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "2b179039-dd3c-40f2-a828-a85085dbbe55",
    "db_unit_of_measure_code_selling": "sample string 44",
    "translations": [
      {
        "field_name": "sample string 1",
        "language_code": "sample string 2",
        "value_translated": "sample string 3"
      },
      {
        "field_name": "sample string 1",
        "language_code": "sample string 2",
        "value_translated": "sample string 3"
      }
    ]
  },
  "line_number": 6,
  "code": "sample string 7",
  "supplier_code": "sample string 8",
  "name": "sample string 9",
  "description": "sample string 10",
  "price": 11.0,
  "quantity": 12.0,
  "memo": "sample string 13",
  "cost_price": 14.0,
  "reference_back_office": "sample string 15",
  "modified_dateutc": "2026-08-19T05:38:32.7255381+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.