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": "fd6dd4f7-f135-409e-b672-84a8ebb20da1",
  "purchase_order_id": "27b35c06-cfc5-4352-a715-7e52cc23347e",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "21f4a6fd-2715-48b7-9274-bd687417943b",
    "id2": 2,
    "jobs_id": "fb76e4f2-687e-418c-a991-30c8b123d8b3",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "d6f7e5ec-0eec-422d-8113-09157415e246",
    "supplier_company_code": "sample string 6",
    "user_id": "8f1525b2-74f1-4f57-996e-224faf771b62",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-07-22T18:40:15.4235377+00:00",
    "date_update": "2026-07-22T18:40:15.4235377+00:00",
    "date_delivery": "2026-07-22T18:40:15.4235377+00:00",
    "confirmed_date_delivery": "2026-07-22T18:40:15.4235377+00:00",
    "delivery_db_address_id": "93ca8fd1-646a-4776-9370-e7ea2fb93ec0",
    "approved_by_user_id": "9157c56d-898a-454f-8316-95fca421e39d",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "3c9957c3-93c1-405e-a969-09ab4fd0e7ef",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "77e55f29-fa03-46cc-ad16-ad8e51ac9eb6",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "d89c50ee-e240-4f73-a0ee-250ee38bc3c8",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-07-22T18:40:15.4235377+00:00"
  },
  "article_id": "980afda5-adca-4aa5-94f6-534e313be1a8",
  "article_code": "sample string 5",
  "article": {
    "id": "2996ab96-2fc4-4a78-9c34-5c387a35c41d",
    "article_category_id": "e3874d90-8fdc-4937-8b7a-0e7bae4fd88f",
    "article_category": {
      "id": "19431746-bf47-487a-b765-e73649d43c86",
      "parent_id": "e61a03e6-aef6-4e57-96bb-8dbc077fd5ad",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-07-22T18:40:15.4235377+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "2f090fbe-cc53-4151-9f9f-449cd9e7c8db",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "41ee5d61-06e0-4cb3-8b0c-38bb5ef62cc8",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "604c821c-08f4-464f-9ef0-899d708bfb20",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "1a56fdd4-6119-4cc6-9f4e-f8c904512ccc",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "1f2a48e9-769e-4dc4-b0cd-a2124b24a103",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "72e3e1a3-656c-4e03-8a00-6d4918053c02",
    "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:40:15.4235377+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:40:15.4235377+00:00",
    "date_update": "2026-07-22T18:40:15.4235377+00:00",
    "modified_dateutc": "2026-07-22T18:40:15.4235377+00:00",
    "article_color_id": "d3337c9b-c3e2-4814-8c1f-659e7dc0f428",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "77cb10de-2e27-477a-8dc4-cae9b84a10a0",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-07-22T18:40:15.4235377+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "28be14f9-d8df-4827-9acc-3c75d8f062ee",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "8461b0f1-31e8-4ec2-8ee5-5782ae515d02",
    "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:40:15.4235377+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.