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": "aed6c3b6-b01a-42b9-9913-5cfd7dac1559",
  "purchase_order_id": "63c99215-4af0-4474-84a9-1f248612a49f",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "76aa35bb-46e1-47c3-ada3-6284f41e6a52",
    "id2": 2,
    "jobs_id": "b69063ad-157a-4d6e-8ef4-2d789fe36a44",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "b5b33f6f-24ce-4d4d-86f2-58b3aa052925",
    "supplier_company_code": "sample string 6",
    "user_id": "b2135cac-cd8b-485a-88bd-e24ee14fe7a6",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2022-12-06T04:37:38.5048257+01:00",
    "date_update": "2022-12-06T04:37:38.5048257+01:00",
    "date_delivery": "2022-12-06T04:37:38.5048257+01:00",
    "confirmed_date_delivery": "2022-12-06T04:37:38.5048257+01:00",
    "delivery_db_address_id": "7651fd1c-abce-4525-8679-4c2507bae078",
    "approved_by_user_id": "6d82750c-0f72-48a6-9d4a-72c71f9cf051",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "475fab31-58d9-43f0-9118-cb4c07b09ac8",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "3a728d23-bb2e-48b8-8624-90639883f5ab",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "3ebed9af-00dc-4f4c-87d4-eeb9108e89ce",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2022-12-06T04:37:38.5048257+01:00"
  },
  "article_id": "8425a00b-0613-47b4-87bd-5b68274cf4b2",
  "article_code": "sample string 5",
  "article": {
    "id": "04a684a4-e491-4b8a-b173-4031d4acef11",
    "article_category_id": "51b9609d-fa7b-4289-980e-da5dfeec80fe",
    "article_category": {
      "id": "2fbb5f33-3d58-4601-b730-a23ee239a491",
      "parent_id": "0b15e640-1883-41c3-bf81-bb7d57bdd5ac",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2022-12-06T04:37:38.5048257+01:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "3f0e7ccf-70b4-4b62-a952-9e2535ab3103",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "333f0c35-2f5e-4e23-aa02-975aff172544",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "c3038df2-12f3-4531-90cd-bf442cd69c7f",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "83fec32c-9c7a-4e65-8ace-1271b1ce539a",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "6282cd81-dca7-4195-a479-6b8598db3780",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "ca97ac9d-921a-4760-9808-dc1a00091e2f",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2022-12-06T04:37:38.5048257+01: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": "2022-12-06T04:37:38.5048257+01:00",
    "date_update": "2022-12-06T04:37:38.5048257+01:00",
    "modified_dateutc": "2022-12-06T04:37:38.5048257+01:00",
    "article_color_id": "df263e2d-c681-4021-a076-e599a623bdf7",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "7c9f3fd0-efa2-4035-b12a-78b30d87703b",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2022-12-06T04:37:38.5048257+01:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "a0049f4d-fc07-4cd9-bdad-7e6e10ddf589",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "cbf46f24-5436-4ae4-aa01-ee84218e6c14",
    "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": "2022-12-06T04:37:38.5048257+01:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.