2023-02-19 06:16:55 +01:00
/api/v1/purchase_orders :
get :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "List purchase orders"
description : "Lists purchase orders, search and filters allow fine grained lists to be generated.\n *\n * Query parameters can be added to performed more fine grained filtering of the purchase orders, these are handled by the PurchaseOrderFilters class which defines the methods available"
operationId : getPurchaseOrders
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
responses :
200 :
description : "A list of purchase orders"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
2023-07-08 12:16:09 +02:00
schema :
type : object
properties :
data :
type : array
items :
$ref : '#/components/schemas/PurchaseOrder'
meta :
type : object
$ref : '#/components/schemas/Meta'
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
post :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Create purchase order"
description : "Adds an purchase order to the system"
operationId : storePurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
responses :
200 :
description : "Returns the saved purchase order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_orders/{id}" :
get :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Show purchase order"
description : "Displays an purchase order by id"
operationId : showPurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The Purchase order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns the purchase order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_order/{id}" :
put :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Update purchase order"
description : "Handles the updating of an purchase order by id"
operationId : updatePurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The purchase order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns the purchase order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
delete :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Delete purchase order"
description : "Handles the deletion of an purchase orders by id"
operationId : deletePurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The purhcase order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns a HTTP status"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_orders/{id}/edit" :
get :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Edit purchase order"
description : "Displays an purchase order by id"
operationId : editPurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The purchase order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns the purchase order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
/api/v1/purchase_orders/create :
get :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Blank purchase order"
description : "Returns a blank object with default values"
operationId : getPurchaseOrderCreate
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
responses :
200 :
description : "A blank purchase order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
/api/v1/purchase_orders/bulk :
post :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Bulk purchase order action"
description : ""
operationId : bulkPurchaseOrderss
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/index"
requestBody :
description : "Purchase Order IDS"
required : true
content :
application/json :
schema :
type : array
items :
description : "Array of hashed IDs to be bulk 'actioned"
type : integer
example : "[0,1,2,3]"
responses :
200 :
description : "The Bulk Action response"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_orders/{id}/{action}" :
get :
deprecated : true
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Custom purchase order actions"
description : "Performs a custom action on an purchase order.\n *\n * The current range of actions are as follows\n * - mark_paid\n * - download\n * - archive\n * - delete\n * - email"
operationId : actionPurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The Purchase Order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
- name : action
in : path
description : "The action string to be performed"
required : true
schema :
type : string
format : string
example : clone_to_quote
responses :
200 :
2023-07-08 12:16:09 +02:00
description : "Returns the purchase order object"
2023-02-19 06:16:55 +01:00
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_orders/{id}/upload" :
put :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Uploads a purchase order document"
description : "Handles the uploading of a document to a purchase_order"
operationId : uploadPurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : id
in : path
description : "The Purchase Order Hashed ID"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns the Purchase Order object"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
content :
application/json :
schema :
2023-07-08 12:16:09 +02:00
$ref : "#/components/schemas/PurchaseOrder"
2023-02-19 06:16:55 +01:00
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"
"/api/v1/purchase_order/{invitation_key}/download" :
get :
tags :
2023-02-19 06:48:54 +01:00
- Purchase Orders
2023-02-19 06:16:55 +01:00
summary : "Download a purchase order PDF"
description : "Downloads a specific purchase order"
operationId : downloadPurchaseOrder
parameters :
- $ref : "#/components/parameters/X-API-TOKEN"
- $ref : "#/components/parameters/X-Requested-With"
- $ref : "#/components/parameters/include"
- name : invitation_key
in : path
description : "The Purchase Order Invitation Key"
required : true
schema :
type : string
format : string
example : D2J234DFA
responses :
200 :
description : "Returns the Purchase Order pdf"
headers :
X-MINIMUM-CLIENT-VERSION :
$ref : "#/components/headers/X-MINIMUM-CLIENT-VERSION"
X-RateLimit-Remaining :
$ref : "#/components/headers/X-RateLimit-Remaining"
X-RateLimit-Limit :
$ref : "#/components/headers/X-RateLimit-Limit"
401 :
$ref : "#/components/responses/401"
403 :
$ref : "#/components/responses/403"
422 :
2023-04-29 15:12:29 +02:00
$ref : '#/components/responses/422'
429 :
$ref : '#/components/responses/429'
5XX :
description : 'Server error'
2023-02-19 06:16:55 +01:00
default :
$ref : "#/components/responses/default"