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": "562c471b-ea9a-43c4-bc32-a4c4e0cd4e05",
  "purchase_order_id": "43d50b0d-0260-4bf3-8384-7affdac40e15",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "2af48363-b174-4db5-a067-eea79a4fd307",
    "id2": 2,
    "jobs_id": "022bcf96-af1f-4671-ae51-c8ae24d3fdad",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "0985c606-0922-4f94-b166-9c8f28bc58ec",
    "supplier_company_code": "sample string 6",
    "user_id": "74e693fa-3139-44ef-9f4d-69a37d9d0e45",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2025-11-16T06:47:55.4184909+00:00",
    "date_update": "2025-11-16T06:47:55.4184909+00:00",
    "date_delivery": "2025-11-16T06:47:55.4184909+00:00",
    "confirmed_date_delivery": "2025-11-16T06:47:55.4184909+00:00",
    "delivery_db_address_id": "c8d31b78-e97f-492f-bba6-fa96fb170358",
    "approved_by_user_id": "93730731-f4c5-4b42-86c6-5c08e344c51e",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "16b67add-f744-4a14-aea4-b220125cf0ac",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "ee2841e2-a036-4626-82e7-da60ea553112",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "f3b2b96d-1034-4065-9429-6859b82aa975",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2025-11-16T06:47:55.4184909+00:00"
  },
  "article_id": "bd3a52d0-baa6-4f9e-aa10-fd0fe1a36b87",
  "article_code": "sample string 5",
  "article": {
    "id": "5652b1ef-da97-44ad-9a02-a79e634a0787",
    "article_category_id": "641164f6-3ca7-4df3-8720-c36177a38434",
    "article_category": {
      "id": "bee7b030-7e6d-4151-afc3-3b83f7878474",
      "parent_id": "500ba02a-b5af-4c1a-9703-346e7c109dec",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2025-11-16T06:47:55.4184909+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "e18d9242-25eb-4a3c-a8b6-62bfda7d9729",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "3a33e3f4-dc23-4df9-8074-a7975f5e2fb8",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "5cc889b7-ee56-4dba-bb88-745914554072",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "b52ab4d9-3a3a-424f-913c-912cd1e430ed",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "5dad1859-bdcd-4ed9-a1e0-ee1607215758",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "547a624a-2902-416a-a969-0136b409fc64",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2025-11-16T06:47:55.4184909+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-11-16T06:47:55.4184909+00:00",
    "date_update": "2025-11-16T06:47:55.4184909+00:00",
    "modified_dateutc": "2025-11-16T06:47:55.4184909+00:00",
    "article_color_id": "3e9747ec-0003-4d06-918d-9fec052b67bb",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "82f67c88-5941-47d0-a441-02e9b63c6c38",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2025-11-16T06:47:55.4184909+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "65a4f89d-e607-4cee-b437-855f46ff6ca4",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "6c7ddd0c-3294-4ef4-a17c-664369ac6dea",
    "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-11-16T06:47:55.4340929+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.