Orders
This describes the order resource in the Provet Connect API.
Operations
Order Resources
The resources that make up an order
Order
Name | Type | Writeable | Required | Description |
---|---|---|---|---|
Id | String | N/A | The Provet Id of the order | |
Status | String | N/A | The status of the order | |
PurchaseOrderNumber | String | POST | Yes | The purchase order number |
Sender | Sender | POST | Yes | |
AdditionalOrderInstructions | AdditionalOrderInstructions | POST | No | |
ShipTo | Address | N/A | Shipping address details are set only from the Order Confirmation page – they are read only via the API | |
OrderLines | Array of OrderLine | POST | Yes |
OrderLine
Name | Type | Writeable | Required | Description |
---|---|---|---|---|
LineItemNumber | String | POST | No | Reference number for the order line |
ProductCode | String | POST | No * | Provet product code |
Description | String | POST | No * | Description of the product |
Quantity | Integer | POST | Yes | The quantity of the item to order (must be > 0) |
Price | Decimal | POST | ||
Critical | Boolean | POST | No | Mark the item as critically required |
Notes | String | POST | No | Additonal product notes |
* Note that either the product code or description is required. Where both are provided the Product Code will be used for Product Identification where it is valid.
Sender
Name | Type | Writeable | Required | Description |
---|---|---|---|---|
AccountCode | String | POST | Yes | Provet account code |
Name | String | POST | Yes | Name of the person creating the order |
String | POST | Yes | Email of the person ordering | |
Phone | String | POST | No | Phone of the person ordering |
AuthorisedBy | String | POST | No | Name of the Vet who authorised this order |
AdditionalOrderInstructions
Name | Type | Writeable | Required | Description |
---|---|---|---|---|
Notes | String | POST | No | Additional notes to submit to Provet |
DeliveryInstructions | String | POST | No | Specific delivery instructions |
IncludeInvoiceWithDelivery | Boolean | POST | No | Include the invoice with the shipment |
RequestedDeliveryDate | Date | POST | No |
Requested future date of delivery Date should be in ISO 8601 format |
ShipWithNextOrder | Boolean | POST | No | Ship this order with the next order |
PickUp | Boolean | POST | No | True if pickup from warehouse |
Address
Name | Type | Writeable | Required | Description |
---|---|---|---|---|
AddressLine1 | String | POST | Yes | |
AddressLine2 | String | POST | No | |
Suburb | String | POST | Yes | |
State | String | POST | Yes | |
Postcode | Integer | POST | Yes | |
Country | String | POST | Yes |
* Note orders will only be delivered to registered addresses with Provet.
OrderPlaced
Name | Type | Description |
---|---|---|
OrderId | Integer | The Provet Electronic Order Id. This is a unique reference allocated to all orders received electronically. |
ConfirmationURL | String | The URL to the order confirmation page in Provet Connect |
* Please note that orders submitted through the API need to be confirmed inside Provet Connect to be sent to Provet for processing.
The ConfirmationURL field contains the URL required to direct the user to the order confirmation page.
OrderError
Name | Type | Description |
---|---|---|
PurchaseOrderNumber | String | The purchase order number of the order |
Errors | Array of String | An array of human readable errors relating to the order |
Create an Order
Create a new order and send through to Provet Connect
POST /orders
Requires an Order object
Response
Successful: Returns an OrderPlaced resource
Failure: Status 401. Returns an OrderError resource
List Orders
Get a list of orders from Provet Connect. Only finalised orders can be returned.
GET /v1/orders
Parameter | Type | Required | Description |
---|---|---|---|
DateFrom | Date | False | The date to start the order list from |
DateTo | Date | False | The date to end the order list on |
UpdatedAfter | DateTime | False |
The result is limited to only those order’s that have had their associated data updated after the supplied DateTime. Specified in UTC ISO 8601 standard. Example: UpdatedAfter=2015-07-17T06:00:00+10:00 Note you may need to encode the date for correct URL parsing (eg: 2015-07-17T06:00:00%2B10:00)
|
Response
Returns as array of OrderSummary resources.
Name | Type | Description |
---|---|---|
OrderId | Integer | The Provet Electronic Order Id. This is a unique reference allocated to all orders received electronically. |
Date | Date |
The date the order was submitted Specified in UTC standard. |
PurchaseOrderNumber | String | |
Status | String | Status of the order |
Get an Order
Get an order from Provet Connect. Only finalised orders can be returned.
GET /orders/{Id}
Parameter | Type | Required | Description |
---|---|---|---|
Id | Integer | True | The Provet Electronic Order Id. This is a unique reference allocated to all orders received electronically. |
Response
Returns an Order resource