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": "9c7152d1-7f96-4ce8-a1d1-bd1f3ec56a77",
  "purchase_order_id": "a6dffd6f-8c04-43d8-8356-5be241559ed3",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "d7592a7d-bb64-48e9-a32d-0be05efa265a",
    "id2": 2,
    "jobs_id": "bfb5da33-02d6-46f9-bc29-b70337d11e86",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "552530a3-e040-4b48-9d7d-21779c6dbd25",
    "supplier_company_code": "sample string 6",
    "user_id": "eb079861-d36a-4aee-8de7-1c654879fd2e",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-08-21T22:00:15.4321395+00:00",
    "date_update": "2026-08-21T22:00:15.4321395+00:00",
    "date_delivery": "2026-08-21T22:00:15.4321395+00:00",
    "confirmed_date_delivery": "2026-08-21T22:00:15.4321395+00:00",
    "delivery_db_address_id": "2513ad4b-a2db-4af9-9cd3-a7d51289fd0d",
    "approved_by_user_id": "d759482e-f9eb-495c-ad6c-957aaf69996e",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "6dec8e0e-9179-49fb-88bf-043988669437",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "f1574b43-fa03-4c04-b4d5-7a80e406fc42",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "6c3fb522-a6cc-4480-b443-03c7c97e6a21",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-08-21T22:00:15.4321395+00:00"
  },
  "article_id": "ea26672a-7cf5-4ad3-929e-503dfe2b7ec1",
  "article_code": "sample string 5",
  "article": {
    "id": "670780c8-495b-4ac5-8dd1-92828cd33dcb",
    "article_category_id": "733ca888-57b5-4056-9c13-da5b53af96f8",
    "article_category": {
      "id": "fdb57c68-7184-452a-a91d-4e3b7f325673",
      "parent_id": "a003165a-e696-4ac1-aa34-969d8dea3e45",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-08-21T22:00:15.4321395+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "6f17e76e-9a8f-48db-b09a-886d2f64b43d",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "c996cffd-ff47-4bb8-b13b-2ad7a44f10a9",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "35aafd1a-5e6b-42d1-bbdb-7e8ad00e5133",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "9586be73-68f7-4ec1-b64b-27b6a7257243",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "15e3f24d-b889-4915-b38e-8da04e6d2336",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "daf329cb-52d2-4b56-94f6-8e8cf59cb945",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-08-21T22:00:15.4321395+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-08-21T22:00:15.4321395+00:00",
    "date_update": "2026-08-21T22:00:15.4321395+00:00",
    "modified_dateutc": "2026-08-21T22:00:15.4321395+00:00",
    "article_color_id": "97d5c684-891f-4922-b83f-780f4757919a",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "18613869-5019-42cc-8807-80cf7e59537a",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-08-21T22:00:15.4321395+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "decb4b8d-ec73-48e2-a484-6e4f23a3dfbb",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "718f3997-ac4d-4381-b89a-7bf30e0b81e8",
    "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-08-21T22:00:15.4321395+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.