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": "efbc22d4-235a-4ffa-a3f9-0f14c1b7ae83",
  "purchase_order_id": "e3af4dbf-7c1c-41e4-8e99-773e0026e018",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "228652aa-627a-4385-97ce-316b7693453d",
    "id2": 2,
    "jobs_id": "a6d4b928-5d0a-430b-bcd0-232043f88455",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "e7877260-c066-4c1b-a7d5-8a6b11dd31eb",
    "supplier_company_code": "sample string 6",
    "user_id": "f3c54d46-73f1-418b-a5e6-4599db24773a",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2025-03-31T13:24:01.3299782+00:00",
    "date_update": "2025-03-31T13:24:01.3299782+00:00",
    "date_delivery": "2025-03-31T13:24:01.3299782+00:00",
    "confirmed_date_delivery": "2025-03-31T13:24:01.3299782+00:00",
    "delivery_db_address_id": "3cb1313e-5fa2-4008-b414-0f62f102702a",
    "approved_by_user_id": "47a3d36d-0d83-4adc-a111-804311d3eca3",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "f3aab1a8-f2ca-4ece-a5de-9834724a8715",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "ca58385a-be1f-4504-8301-7ddfc67d4d44",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "61e0de7b-54cf-462d-a9db-cb0383170fc9",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2025-03-31T13:24:01.3299782+00:00"
  },
  "article_id": "c2462c45-1857-49ce-989b-2c5af6c1d700",
  "article_code": "sample string 5",
  "article": {
    "id": "5c923cfc-a212-4bb8-a683-81821772f08b",
    "article_category_id": "45abed3a-2838-486c-b3fe-9b6ef2622182",
    "article_category": {
      "id": "2ffd0a4f-85a6-462e-a066-f1f8182b10e6",
      "parent_id": "72c48502-fc5e-4182-a59e-65ec640b3dae",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2025-03-31T13:24:01.3299782+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "b78bf254-83df-4c62-ae0e-8c524a47cf4a",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "18f1a37f-724b-4a49-8fe0-3b9b284b2577",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "8380f2ae-b1e1-4004-8b04-7662b4cc79dc",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "9ddeffa1-844b-482f-9039-59b59b641ba9",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "208b1696-f114-496c-b409-6222945faeac",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "e57c6203-ef1b-4783-a72d-2159b8b9752f",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2025-03-31T13:24:01.3299782+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-03-31T13:24:01.3299782+00:00",
    "date_update": "2025-03-31T13:24:01.3299782+00:00",
    "modified_dateutc": "2025-03-31T13:24:01.3299782+00:00",
    "article_color_id": "9a26969f-0007-4982-ab4e-7a3d4fcd5568",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "a0e0f497-4644-446b-8e3d-4314a92c81ac",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2025-03-31T13:24:01.3299782+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "e8c79087-7c46-4b1b-96a4-ac5218350c5a",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "23dd4575-ca1d-46a6-8b2e-f3325abff582",
    "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-03-31T13:24:01.3299782+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.