1. List Purchase Orders (api1/purchase_orders)
This method will answer with a collection of iinsight's purchase orders (contact oriented data) that belong to a case. The collection will be in JSON format.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/purchase_orders |
GET |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/purchase_orders |
GET |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| case_id |
An iinsight case ID. |
Yes |
Response
[
{
"record_id": "##", // internal iinsight ID
"purchase_order": "xxx xxx"
},
{
"record_id": "##",
"purchase_order": "xxx"
}
]
2. New Purchase Order (api1/purchase_orders/new)
This method will allow to create a case purchase order.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/purchase_orders/new |
POST |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/purchase_orders/new |
POST |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| case_id |
An iinsight case ID. |
Yes |
| purchase_order |
Purchase order name. (i.e.: xxx) |
Yes |
Response
{
"response": "Purchase order created",
"purchase_order_id": ##
}
3. Delete Purchase Order (api1/purchase_orders/delete)
This method will allow to delete a case purchase order.
URL
| Server |
URL |
HTTP type |
| UAT |
https://api-ca-uat.iinsightonline.com/api1/purchase_orders/delete |
DELETE |
| PRODUCTION |
https://api-ca.iinsightonline.com/api1/purchase_orders/delete |
DELETE |
Authorization
| Parameter |
Value |
Mandatory |
| Type |
Bearer Token |
Yes |
| Token |
The token is generated using the /auth/login method |
Yes |
Query Params
| Parameter |
Value |
Mandatory |
| case_id |
An iinsight case ID. |
Yes |
Response
{
"response": "Purchase order deleted",
"purchase_order_id": "##"
}