Creates a new purchase order

Request Information

URI Parameters :

None.

Body Parameters :

purchase_order
NameDescriptionTypeAdditional information
id

Primary Key

globally unique identifier
id2

Internal ID (numeric) automatically filled if empty

integer
jobs_id

Foreign key to Jobs

globally unique identifier

Optionally required : jobs_id, jobs_reference_back_office or jobs must be provided

jobs_reference_back_office

Embedded entity "jobs" using ERP PK when adding/updating

string

Optionally required : jobs_id, jobs_reference_back_office or jobs must be provided

jobs

Embedded entity "jobs" using ERP PK when adding/updating

jobs

Optionally required : jobs_id, jobs_reference_back_office or jobs must be provided

supplier_company_id

Foreign key to company, contains the supplier

globally unique identifier
supplier_company_code

Embedded entity "company" for the supplier using ERP PK when adding/updating

string
supplier_company

Embedded entity "company" for supplier using ERP PK when adding/updating

company
user_id

Creator of the purchase order

globally unique identifier
user_code

Embedded entity "user" for creator using ERP PK when adding/updating purchase_order

string
user

Embedded entity "user" for creator using node when adding/updating purchase_order

user
description

Description of the purchase order

string

Max length: 4000

memo

Memo, remark

string
total_lines

Number of lines, automatically filled when adding/updating/deleting lines

integer
date_create

Creation date

date
date_update

Last update date

date
date_delivery

Estimated date of delivery

date
confirmed_date_delivery

Date of the delivery

date
delivery_db_address_id

If Delivery and no picking, AddressID of the company (if not the main)

globally unique identifier
approved_by_user_id

If approval was needed, which user approves it

globally unique identifier
approved_by_user_code

Embedded entity "user" for approver using ERP PK when adding/updating purchase_order

string
approved_by_user

Embedded entity "user" for approver using node when adding/updating purchase_order

user
technical_user_id

User to contact if case of technical question about the purchase order

globally unique identifier
technical_user_code

Embedded entity "user" for technical user using ERP PK when adding/updating purchase_order

string
technical_user

Embedded entity "user" for technical user using node when adding/updating purchase_order

user
purchase_order_status_id

Foreign key to purchase_order_status

globally unique identifier

Optionally required : purchase_order_status_id or purchase_order_status_code must be provided

purchase_order_status_code

Foreign key to purchase_order_status using code. Use "Approved","SentToSupplier","Cancelled" or "Delivered"

string

Optionally required : purchase_order_status_id or purchase_order_status_code must be provided

article_stock_location_id

Stock location that will receive the articles

globally unique identifier
is_pickup

If pickup, the technician will go himself to the supplier to take the goods

boolean
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": "b41d3e12-980f-47d7-84b8-54fe26f1faa1",
  "id2": 2,
  "jobs_id": "e9d6b182-8c40-482b-8a9c-51fe706f0a6b",
  "jobs_reference_back_office": "sample string 4",
  "supplier_company_id": "cd81238a-6586-4b6b-9b92-6313c782ee76",
  "supplier_company_code": "sample string 6",
  "user_id": "92e804f6-d430-492c-9a2c-be38792bdefb",
  "user_code": "sample string 8",
  "description": "sample string 9",
  "memo": "sample string 10",
  "total_lines": 11,
  "date_create": "2025-01-18T11:02:53.0234298+00:00",
  "date_update": "2025-01-18T11:02:53.0234298+00:00",
  "date_delivery": "2025-01-18T11:02:53.0234298+00:00",
  "confirmed_date_delivery": "2025-01-18T11:02:53.0234298+00:00",
  "delivery_db_address_id": "738f6f3f-7f9b-4942-9b84-975fac027ec0",
  "approved_by_user_id": "e33946ac-c92b-4857-9444-9ce03d7f56c5",
  "approved_by_user_code": "sample string 18",
  "technical_user_id": "57840abe-4975-4c3d-9cee-9166c8aab5a9",
  "technical_user_code": "sample string 20",
  "purchase_order_status_id": "febf1545-c111-484e-b189-c932b33dca14",
  "purchase_order_status_code": "sample string 22",
  "article_stock_location_id": "e5152e3a-43ce-46ba-af30-6ae670e4b384",
  "is_pickup": true,
  "reference_back_office": "sample string 25",
  "modified_dateutc": "2025-01-18T11:02:53.0234298+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.