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": "b0ad13ef-cc55-49fa-929a-8e9da584e116",
  "purchase_order_id": "9ee8a16e-b6ba-4a4f-9264-2459225af31b",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "e2cd08c8-b894-4d3b-ae8b-08cf21eb64a0",
    "id2": 2,
    "jobs_id": "3d09b822-7ee7-48fb-abfc-ca2e2ef7d344",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "34995da5-329c-4c4b-b70f-6010ceae80f2",
    "supplier_company_code": "sample string 6",
    "user_id": "0b552f98-6bd0-470a-86e7-fe4b134bff66",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-07-22T18:02:53.154502+00:00",
    "date_update": "2026-07-22T18:02:53.154502+00:00",
    "date_delivery": "2026-07-22T18:02:53.154502+00:00",
    "confirmed_date_delivery": "2026-07-22T18:02:53.154502+00:00",
    "delivery_db_address_id": "bbd33711-a2da-4d66-8adf-12a74aada05f",
    "approved_by_user_id": "4402f99b-fb8b-4eec-b31e-b4b4a6891999",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "5dda9302-521e-44af-9d6e-74a5463ad3ea",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "4fa746d4-e6ac-466a-b989-e65b5d81b4c7",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "64894d96-b13b-491b-a202-a0209d6e2bd1",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-07-22T18:02:53.154502+00:00"
  },
  "article_id": "819eb427-a39d-4df9-91eb-b597025af374",
  "article_code": "sample string 5",
  "article": {
    "id": "9c7f6fe3-5e57-48b8-9d98-7bd20108d525",
    "article_category_id": "d43e3ef5-1dd2-47da-85fd-1f1acf4b2b7e",
    "article_category": {
      "id": "bd8ba39e-233c-4cd3-8139-ea037c547efd",
      "parent_id": "940317d9-df61-498e-a21f-02a947c2d13c",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-07-22T18:02:53.154502+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "f1a9433f-1f62-401a-b111-b144496dba17",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "12ab0625-e45c-4917-b3b8-f0cfd4974fe3",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "dafbd90e-c2c6-4de2-ad19-fd2a50624d6f",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "c2e7249b-647f-4e11-a414-909cdb30361a",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "9b030904-05ea-45fd-a8b7-09bbd91091b4",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "b642a485-bb8f-4efc-9213-b838e590d919",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-07-22T18:02:53.154502+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-07-22T18:02:53.154502+00:00",
    "date_update": "2026-07-22T18:02:53.154502+00:00",
    "modified_dateutc": "2026-07-22T18:02:53.154502+00:00",
    "article_color_id": "98d8fb52-967c-4ce6-83de-c67bc7705e1c",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d43c4d60-d4d2-4f6a-952a-0d543f148159",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-07-22T18:02:53.154502+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "8b283a65-5ed3-413b-9ed9-a2faf342576f",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "7f2b0e2b-4693-4bc5-832f-d897e627b345",
    "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-07-22T18:02:53.154502+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.