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": "3234f0aa-1221-4cf5-875d-1bae8854703e",
  "purchase_order_id": "295692e6-7baf-4460-bb94-38d2a15651e0",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "c26ba980-861a-4837-b73b-0aee6e5a0c0b",
    "id2": 2,
    "jobs_id": "ca42d515-67ea-486c-a19e-2cf045f5022d",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "cc4d625b-9156-4103-9e17-d90d6c466235",
    "supplier_company_code": "sample string 6",
    "user_id": "8f579743-c308-459d-907a-4ac721aed593",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-02-17T17:09:57.5240761+00:00",
    "date_update": "2026-02-17T17:09:57.5240761+00:00",
    "date_delivery": "2026-02-17T17:09:57.5240761+00:00",
    "confirmed_date_delivery": "2026-02-17T17:09:57.5240761+00:00",
    "delivery_db_address_id": "8be5d8e9-3a50-4690-90d5-864581ebbe2e",
    "approved_by_user_id": "c142f220-2fd2-48bf-ae2f-9f51d9cac25d",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "2b7d3103-1a42-40fa-a09b-3723fb3aca0a",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "e099f923-5039-44a8-bc75-75abc34e13df",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "21eb1d46-de30-4530-bca2-a920d21f6679",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-02-17T17:09:57.5240761+00:00"
  },
  "article_id": "1c5e65b2-13c0-464c-9f55-5ca8713ff6b1",
  "article_code": "sample string 5",
  "article": {
    "id": "60bb6a4e-a99b-486b-962d-efe01d5be22d",
    "article_category_id": "edfa4f6a-b9ce-420c-9db3-fd7a20d1d609",
    "article_category": {
      "id": "ecf8271f-1043-4437-9e99-2d4c3309d1b5",
      "parent_id": "4110726e-ab8d-4157-991c-0d770ed41913",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-02-17T17:09:57.5240761+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "bb660438-d5da-4a6d-adaa-ccef1c634462",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "00bf6a8a-e746-428d-a457-ccddffd5886d",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "36e5b02c-19d3-41fc-96fa-864f619017f1",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "536775d9-b1ee-48d8-a86d-37bb5fe2e4ef",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "e7b4ee69-c2c3-48fa-99d5-0e1eb4e9e45b",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "cac5e990-26b2-49c7-b9ca-ac00a119fc72",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-02-17T17:09:57.5240761+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-02-17T17:09:57.5240761+00:00",
    "date_update": "2026-02-17T17:09:57.5240761+00:00",
    "modified_dateutc": "2026-02-17T17:09:57.5240761+00:00",
    "article_color_id": "d57408b3-03fc-409b-868f-a5e3f6390cf8",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "1238f459-59f5-4683-b489-a77fa26efb4b",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-02-17T17:09:57.5240761+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "3893e871-2408-46d4-9fe5-659ee9b9915b",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "f57b174f-eb16-46f9-9f48-9e901e8efcd9",
    "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-02-17T17:09:57.5240761+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.