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": "2a5e7cfc-90db-4a12-aca6-80df9a6370db",
  "purchase_order_id": "3bace8e8-32c1-491c-9304-2dd7669735b5",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "1bb946ec-d275-4965-90ab-a21580b6a3a1",
    "id2": 2,
    "jobs_id": "8e73ed1a-b06c-495e-bbe4-f4e1786ad253",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "65bb4124-65aa-4fe1-95a7-4a8c8f3fc352",
    "supplier_company_code": "sample string 6",
    "user_id": "3aaab9cc-cb19-49ab-b877-0e410c42617e",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-06-27T07:13:56.5208689+00:00",
    "date_update": "2026-06-27T07:13:56.5208689+00:00",
    "date_delivery": "2026-06-27T07:13:56.5208689+00:00",
    "confirmed_date_delivery": "2026-06-27T07:13:56.5208689+00:00",
    "delivery_db_address_id": "4e1399c2-12c0-4ef1-9d66-3bc23a1300c9",
    "approved_by_user_id": "fde1ee7c-5bb5-44f2-87fe-301e8b2b8a08",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "87651bb7-58ce-4b74-9619-05f124682cd5",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "411e2514-73ea-4b48-bb60-a8115fd83f8d",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "953feb2f-08f3-4ab5-a448-f082e80a69ac",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-06-27T07:13:56.5208689+00:00"
  },
  "article_id": "90864983-37a5-4d92-96a3-9c0e8c1a476e",
  "article_code": "sample string 5",
  "article": {
    "id": "05d99443-513a-4b74-ae24-9e1e56931afc",
    "article_category_id": "47068129-0af9-472b-ab62-17311366ec81",
    "article_category": {
      "id": "5199e1d0-418f-4a2a-ae30-aa43e9522234",
      "parent_id": "cafc1caa-e62b-4648-a94b-95b2303f448f",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-06-27T07:13:56.5208689+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "d1d44de1-546d-4c9d-802a-4ea11d10650e",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "81bb228b-793a-412b-8294-5b024609b7ff",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "77290c74-2255-4eec-87eb-724ab4c92d1b",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "8c0fe291-c0f7-4cd1-8d99-787f02d04fde",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "b36c05a5-bacb-4a8f-86ff-44bde44e3569",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "535142a7-eabd-493f-967b-70dec07ed133",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-06-27T07:13:56.5208689+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-06-27T07:13:56.5208689+00:00",
    "date_update": "2026-06-27T07:13:56.5208689+00:00",
    "modified_dateutc": "2026-06-27T07:13:56.5208689+00:00",
    "article_color_id": "3023f192-30f3-48f7-b4cf-7dbe98d9c239",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d344ea7b-d7f2-4b44-8ef8-711326adf0bb",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-06-27T07:13:56.5208689+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "f8c40a9a-3a0d-4306-830f-ea58aef1dcb8",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "305a6a7b-9485-4394-a67c-3879a3788f5e",
    "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-06-27T07:13:56.5208689+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.