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": "bf6edb76-b3e7-4c67-b4a7-59b3689177db",
  "purchase_order_id": "50fd037a-8c16-4899-94bc-e81a68ac3032",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "b6186d38-1ab8-4ecf-9fc3-acc595bbe43c",
    "id2": 2,
    "jobs_id": "5e4eb275-2676-4196-8510-b5f9eac04063",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "2e834569-88ca-4956-9549-a2d4021360b6",
    "supplier_company_code": "sample string 6",
    "user_id": "41badab0-bf14-44b5-b832-a6ecb47f1baf",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-06-04T22:47:04.5353106+00:00",
    "date_update": "2026-06-04T22:47:04.5353106+00:00",
    "date_delivery": "2026-06-04T22:47:04.5353106+00:00",
    "confirmed_date_delivery": "2026-06-04T22:47:04.5353106+00:00",
    "delivery_db_address_id": "34c3a0a5-c0ae-4a34-9763-b52041caf6f1",
    "approved_by_user_id": "dacb06da-d914-4691-acfc-9c257bcfc1ba",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "442b9b91-00db-4ed3-8e2c-7ac7760b6370",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "280def13-e84a-43c7-9e7d-7f0948a3fde0",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "02c06eac-de11-4e3d-98e0-ceecbf19877b",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-06-04T22:47:04.5353106+00:00"
  },
  "article_id": "375e5f1f-d0cf-4972-9ca1-cbde135edee2",
  "article_code": "sample string 5",
  "article": {
    "id": "b79be55e-36ad-442f-9c34-5a07ca86fff7",
    "article_category_id": "b25472b2-cb34-4095-a0b4-c60314fee59f",
    "article_category": {
      "id": "58ca792a-a47a-4c4e-8a09-61a08b7c397f",
      "parent_id": "cb633bda-aa7a-40c8-a6b8-bf52db1c1c9a",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-06-04T22:47:04.5353106+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "bbe5bd6f-6934-4776-81d9-b65aed79bc29",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "8b4327c3-e1cb-4109-afb2-01246206cb4e",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "4787fcbb-8cb1-44a8-9d6c-30ab2d123969",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "bda00735-0ec6-4fa3-9962-6d24face5d68",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "a11a3302-2ad6-4ce2-b766-0b7e4865dba9",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "749b45ac-7b51-4627-a8cf-05116c635853",
    "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-04T22:47:04.5353106+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-04T22:47:04.5353106+00:00",
    "date_update": "2026-06-04T22:47:04.5353106+00:00",
    "modified_dateutc": "2026-06-04T22:47:04.5353106+00:00",
    "article_color_id": "37fc3cb4-dc05-4cbb-8bbe-87d9c9095039",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "b1ed678a-16cb-4aed-b51d-163d5453ad3d",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-06-04T22:47:04.5353106+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "122f0b48-3cc6-4500-85f2-33faab9daeea",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "5d7d7c8b-9b26-4af4-b9d1-7fcc2847bf1a",
    "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-04T22:47:04.5353106+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.