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": "6166a967-a3e0-4ab8-b7e0-9ca73d253554",
  "purchase_order_id": "d20334ee-e0ca-4b19-a066-2e4e8befed03",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "e17bcb26-475e-4d25-a2aa-c8ebdfe7adaf",
    "id2": 2,
    "jobs_id": "4d974247-76bb-4784-a597-7c97908c6942",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "e522678f-3986-4548-b54c-ac2e053ce98b",
    "supplier_company_code": "sample string 6",
    "user_id": "d6e288bb-503c-46e1-bd79-63d9ef8b81f8",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2025-09-15T21:58:25.094074+00:00",
    "date_update": "2025-09-15T21:58:25.094074+00:00",
    "date_delivery": "2025-09-15T21:58:25.094074+00:00",
    "confirmed_date_delivery": "2025-09-15T21:58:25.094074+00:00",
    "delivery_db_address_id": "33aa3cbd-fc8c-42df-bfec-5742303f9b8f",
    "approved_by_user_id": "6655a1d0-9a95-4422-ba9b-4ffa65985c02",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "ea49c339-8154-42b8-baf7-8aedbf646982",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "ee33f599-aeee-4d0a-a5c4-4a030e8697c9",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "6970b7cb-4171-436a-918b-97a6f51de949",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2025-09-15T21:58:25.094074+00:00"
  },
  "article_id": "6f836b35-ab81-4f4e-8d24-ed0e08a47585",
  "article_code": "sample string 5",
  "article": {
    "id": "afc59bf0-2e51-43cf-8787-07384aa91989",
    "article_category_id": "b43b76af-24f2-49f4-b700-d269d68142c0",
    "article_category": {
      "id": "75c98a0d-6371-41b3-84cd-38ebd6706dcf",
      "parent_id": "9938af73-a51f-4f94-9198-895b7fcbebad",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2025-09-15T21:58:25.094074+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "27ae0726-4df3-42ea-bce5-3d6354181d4e",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "4999ca9d-010e-4618-99f2-8c42d98b2cd1",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "9cbb14f9-f37a-450f-b077-2cd72a178c79",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "5de30662-a201-4035-b64a-981b3d905a07",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "45939268-6f7e-4be8-a907-4adcf130fe35",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "1d2d6a30-eab7-45a5-9adb-4d41d6ba1602",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2025-09-15T21:58:25.094074+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": "2025-09-15T21:58:25.094074+00:00",
    "date_update": "2025-09-15T21:58:25.094074+00:00",
    "modified_dateutc": "2025-09-15T21:58:25.094074+00:00",
    "article_color_id": "9d855730-ad00-4a9c-b241-c890fa13e8f0",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "41218864-d89f-4e5a-b8f4-53bab348da34",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2025-09-15T21:58:25.094074+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "2fdd7924-b54b-41cc-8d2f-9a8466b63c46",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "79af0276-2a26-4115-b1d6-ad066e369cf0",
    "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": "2025-09-15T21:58:25.094074+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.