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": "adfe1bc3-982d-4f9a-a6bd-4852173e4d1f",
  "purchase_order_id": "b7fed073-9bfd-4b1f-b351-364986f57e65",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "da4c89f1-68c5-4c33-8648-e11241150ebb",
    "id2": 2,
    "jobs_id": "d759dfb5-1622-4d5d-998b-cc0e75d22c32",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "daf1a6cb-13e2-4a8c-92d9-9c49e9ad7bd1",
    "supplier_company_code": "sample string 6",
    "user_id": "905dd163-eb3a-4e4c-aa85-f83c2a772ec1",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-10-31T11:07:07.9410053+00:00",
    "date_update": "2026-10-31T11:07:07.9410053+00:00",
    "date_delivery": "2026-10-31T11:07:07.9410053+00:00",
    "confirmed_date_delivery": "2026-10-31T11:07:07.9410053+00:00",
    "delivery_db_address_id": "48754c1c-e22f-4860-9813-551e216aa49a",
    "approved_by_user_id": "73ead353-3ed1-4881-950a-359603f2cc84",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "6bbd2da4-f888-4705-ab0e-1857a5286d14",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "286656e2-bd25-4ef8-b834-9327bc4970e7",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "90d9088a-d2a1-47e6-83f6-e65ebb0df09d",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-10-31T11:07:07.9410053+00:00"
  },
  "article_id": "0caaca12-b2f5-4d2a-a51f-68b635ecb7cb",
  "article_code": "sample string 5",
  "article": {
    "id": "66e4b2de-c261-416b-a3e0-d4c2182a1144",
    "article_category_id": "a087d456-3818-4809-9088-49a7eccb810a",
    "article_category": {
      "id": "dbf021c6-96cf-4384-8fc6-62e9f3e1997d",
      "parent_id": "28426a30-726a-4520-86b4-662fe76cf882",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-10-31T11:07:07.9410053+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "7f54182d-bff8-48cb-b08e-7c5dfe554c05",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "2ec44793-0dfd-4a3b-96c9-1d46cadd7e5b",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "3d7b497f-2c3b-49b8-89ed-d59533355810",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "26f360bd-e9f1-4c56-bb8f-20273a0a4967",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "8f97d83e-cfb0-4d88-8df6-83d7aff69fe3",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "0235ae01-f721-484e-b706-0b931024e623",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-10-31T11:07:07.9410053+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-10-31T11:07:07.9410053+00:00",
    "date_update": "2026-10-31T11:07:07.9410053+00:00",
    "modified_dateutc": "2026-10-31T11:07:07.9410053+00:00",
    "article_color_id": "edf1b342-1cad-494f-8cf3-6312d869e95f",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "da7a212c-dbcd-4a73-8a79-fbb15004dbdf",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-10-31T11:07:07.9410053+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "6af39059-84e2-4dbc-bd96-ee08ade7345c",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "7cec777c-a9d9-4815-a982-05a947640610",
    "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-10-31T11:07:07.9609462+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.