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": "3a3e4b66-905a-4908-833c-bc5507a44bc9",
  "purchase_order_id": "4226a502-f69a-408b-847f-8dae1fec5e2c",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "7146a68b-c959-4aad-a8ca-67738cb70454",
    "id2": 2,
    "jobs_id": "949bc4bf-2832-4455-92dc-282cdb0ad07e",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "85d4671c-59f4-4c42-8f6e-1264791d8aec",
    "supplier_company_code": "sample string 6",
    "user_id": "441de0c7-a30a-41f0-8b5a-12b3b7f54bc8",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-04-09T16:14:40.2246133+00:00",
    "date_update": "2026-04-09T16:14:40.2246133+00:00",
    "date_delivery": "2026-04-09T16:14:40.2246133+00:00",
    "confirmed_date_delivery": "2026-04-09T16:14:40.2246133+00:00",
    "delivery_db_address_id": "27a75b52-5af0-4acb-883a-322e860ee4ff",
    "approved_by_user_id": "c6531ed9-7690-4e74-b49f-5facc6108466",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "85932883-69ba-4dbc-a744-2ec600d400ae",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "4ca7cbb5-4e3c-4299-b3f5-d59a71d5cdc0",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "b31fa370-3dee-4a69-b13d-d8d001d57148",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-04-09T16:14:40.2246133+00:00"
  },
  "article_id": "72e078d7-f230-45ae-b78c-99c0bb77ef3e",
  "article_code": "sample string 5",
  "article": {
    "id": "f4c740a3-9437-4e3f-a190-29417ac30ff1",
    "article_category_id": "665205f8-9501-4c5f-8976-a0f1aebccc37",
    "article_category": {
      "id": "ec0c9d1f-aea5-418c-9396-53b29514bfd8",
      "parent_id": "d63a9b0b-785d-4c20-aac9-ad758dce90c5",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-04-09T16:14:40.2246133+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "196ddc59-bb87-4bf6-842c-016a41dff324",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "daeed40d-2536-4774-aae5-78dd767be89f",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "f3b14119-cd48-4650-b090-c26413ac08cb",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "cd505477-cde1-45e5-b787-3cd6bb5d91c6",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "66f59756-50d9-47bd-b1e3-69eb65395a57",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "01844312-28dc-4bb3-91c2-6b85bf0dd6b7",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-04-09T16:14:40.2246133+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-04-09T16:14:40.2246133+00:00",
    "date_update": "2026-04-09T16:14:40.2246133+00:00",
    "modified_dateutc": "2026-04-09T16:14:40.2246133+00:00",
    "article_color_id": "d5c0a08a-24cd-459f-8adb-3651845b1661",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d80eb788-d92d-4c7c-90bf-e348b18b561d",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-04-09T16:14:40.2246133+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "251a0d10-1e02-4b07-b99b-9cc44a17437f",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "24d6d492-8659-4c0d-8cd2-7bdac9d52e5b",
    "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-04-09T16:14:40.2246133+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.