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": "45233d9c-5b07-4687-bfab-6c059e53ba55",
  "purchase_order_id": "78026245-5ba8-4d37-80ad-2acbf85e453e",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "24098424-096e-43bc-b724-ffefeb9bf5b2",
    "id2": 2,
    "jobs_id": "2682e5f4-cf55-4801-ab04-f8cb50e69daa",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "f3c2eef3-3dd1-4e23-b12b-92754b7f5a53",
    "supplier_company_code": "sample string 6",
    "user_id": "56b2a04e-7e44-4225-bb33-33e3b7c4ddf9",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-03-12T02:45:21.335128+00:00",
    "date_update": "2026-03-12T02:45:21.335128+00:00",
    "date_delivery": "2026-03-12T02:45:21.335128+00:00",
    "confirmed_date_delivery": "2026-03-12T02:45:21.335128+00:00",
    "delivery_db_address_id": "f352690d-59e3-44d3-ad57-f007dc03ed91",
    "approved_by_user_id": "4ee7f4c7-542d-475b-9aca-10f1223b13ab",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "f7593bc6-ee7a-48d5-bd34-72f939eac2cf",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "359c47d2-2867-4ee4-a182-792cb5f6931d",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "3c018dc4-ba91-417e-9c85-53e3a0316001",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-03-12T02:45:21.335128+00:00"
  },
  "article_id": "b66271ad-620e-425d-b6a1-cf37f0c43081",
  "article_code": "sample string 5",
  "article": {
    "id": "5a282f00-5059-4317-a2c9-97dd6bef387f",
    "article_category_id": "b9b6d1a2-9e80-4ede-8b6f-3653438d0eef",
    "article_category": {
      "id": "7dc92620-3bc7-41c5-96a3-6983b1b7b8f4",
      "parent_id": "4f20f2b7-f10c-48b2-83c2-1d831c768f8e",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-03-12T02:45:21.335128+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "d3a1fc53-cbfa-4f40-aff1-53167783ccfa",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "6920a902-6705-46ee-bb59-04d8fd58d300",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "e97d775a-991d-4707-ad90-1bd02da40d01",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "d288a5c3-d0c1-4c97-8fda-66d1197e8989",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "719eaad3-4220-44d8-bba6-79881677dc6f",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "619168aa-009d-417a-bed2-1100693c440c",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-03-12T02:45:21.335128+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-03-12T02:45:21.335128+00:00",
    "date_update": "2026-03-12T02:45:21.335128+00:00",
    "modified_dateutc": "2026-03-12T02:45:21.335128+00:00",
    "article_color_id": "bda40cf8-55fb-4c58-8388-53dd09b5ab7f",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "6f47b38a-b55f-4a64-b744-5f16ff121852",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-03-12T02:45:21.335128+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "a4630485-c777-43a5-8900-cf61a9ae3a16",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "68249021-d710-42d0-a107-1fcc3ec50f3b",
    "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-03-12T02:45:21.335128+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.