Depot procurement
Registers the procurement routes (not RMAs, PunchOut or the distributor catalog, which are other owners’).
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
GET /api/v1/inventory/items/{id}/suppliers
Section titled “GET /api/v1/inventory/items/{id}/suppliers”GETinventory:readshared facehosteditmspIdempotent
Source: [object Object]
listSupplierItems lists who sells a stock item, with their part numbers and costs.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, array of SupplierItemView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold inventory:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
[].costCentsrequired | integer | int64. |
[].leadDaysrequired | integer | |
[].publicIdrequired | string | |
[].rowVersionrequired | integer | int64. |
[].stockItemIdrequired | string | |
[].supplierIdrequired | string | |
[].supplierNamerequired | string | |
[].supplierSkurequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/inventory/items/{id}/suppliers/{supplierId}
Section titled “PUT /api/v1/inventory/items/{id}/suppliers/{supplierId}”PUTprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
putSupplierItem sets one supplier’s part number, cost and lead time for a stock item.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
supplierId | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, SupplierItemView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
costCentsrequired | integer | int64. |
leadDaysrequired | integer | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
stockItemIdrequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierSkurequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/inventory/items/{id}/suppliers/{supplierId}
Section titled “DELETE /api/v1/inventory/items/{id}/suppliers/{supplierId}”DELETEprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
deleteSupplierItem removes a supplier from a stock item.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
supplierId | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | This supplier does not sell this item. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/inventory/items/<id>/suppliers/<supplierId>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/bills
Section titled “GET /api/v1/procurement/bills”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listBills lists supplier bills, newest bill date first.
Filters: state (comma-separated), supplier, q (bill number or supplier), from, to.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | No | |
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
q | query | string | No | Free-text search term. |
state | query | string, one of approved, draft, exported, matched, variance, void | No | Comma-separated set. An unrecognised value is refused. |
supplier | query | string | No | |
to | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultBillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of BillView | |
items[].approvedAt | string or null | |
items[].approvedByName | string or null | |
items[].billDaterequired | string | |
items[].billNumberrequired | string | |
items[].createdAtrequired | string | |
items[].dueOn | string or null | |
items[].exportBatch | string or null | |
items[].exportedAt | string or null | |
items[].freightCentsrequired | integer | int64. |
items[].linesrequired | array of BillLineView | |
items[].lines[].amountCentsrequired | integer | int64. |
items[].lines[].descriptionrequired | string | |
items[].lines[].kindrequired | string | |
items[].lines[].matchStaterequired | string | |
items[].lines[].periodEnd | string or null | |
items[].lines[].periodStart | string or null | |
items[].lines[].poNumber | string or null | |
items[].lines[].poQtyOrdered | string or null | |
items[].lines[].poQtyReceived | string or null | |
items[].lines[].poUnitCostCents | integer or null | int64. |
items[].lines[].positionrequired | integer | |
items[].lines[].proRatarequired | boolean | |
items[].lines[].publicIdrequired | string | |
items[].lines[].purchaseOrderId | string or null | |
items[].lines[].purchaseOrderLineId | string or null | |
items[].lines[].qtyrequired | string | |
items[].lines[].subscriptionExternalId | string or null | |
items[].lines[].unitCostCentsrequired | integer | int64. |
items[].lines[].varianceCentsrequired | integer | int64. |
items[].publicIdrequired | string | |
items[].rowVersionrequired | integer | int64. |
items[].sourcerequired | string | |
items[].staterequired | string | |
items[].subtotalCentsrequired | integer | int64. |
items[].supplierIdrequired | string | |
items[].supplierNamerequired | string | |
items[].taxCentsrequired | integer | int64. |
items[].totalCentsrequired | integer | int64. |
items[].varianceCentsrequired | integer | int64. |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/bills?from=<from>&page=0&pageSize=0&q=<q>&state=approved&supplier=<supplier>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/bills?from=<from>&page=0&pageSize=0&q=<q>&state=approved&supplier=<supplier>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills"params = { "from": "<from>", "page": "0", "pageSize": "0", "q": "<q>", "state": "approved", "supplier": "<supplier>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/bills?from=<from>&page=0&pageSize=0&q=<q>&state=approved&supplier=<supplier>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/procurement/bills");url.searchParams.set("from", "<from>");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("q", "<q>");url.searchParams.set("state", "approved");url.searchParams.set("supplier", "<supplier>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/bills?from=<from>&page=0&pageSize=0&q=<q>&state=approved&supplier=<supplier>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/bills
Section titled “POST /api/v1/procurement/bills”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
createBill enters a supplier bill by hand.
Freight and tax given as totals become lines of their own.
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/bills' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/bills' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/bills", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/bills");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/bills/{id}
Section titled “GET /api/v1/procurement/bills/{id}”GETprocurement:readshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
getBill reads one supplier bill with its lines and their match.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/bills/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/bills/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/bills/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/<id>";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/bills/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/procurement/bills/{id}
Section titled “PUT /api/v1/procurement/bills/{id}”PUTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
putBill replaces a draft, matched or variance bill (rowVersion required); it returns to draft and is matched again.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/procurement/bills/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/procurement/bills/<id>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/procurement/bills/<id>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/<id>";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/procurement/bills/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/bills/{id}/approve
Section titled “POST /api/v1/procurement/bills/{id}/approve”POSTprocurement:approveshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
approveBill approves a matched (or variance) bill and rolls its freight, fees and price variance into the landed cost of what it paid for.
A second approve changes nothing.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/bills/<id>/approve' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/bills/<id>/approve' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/<id>/approve"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/bills/<id>/approve", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/<id>/approve";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/bills/<id>/approve");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/bills/{id}/match
Section titled “POST /api/v1/procurement/bills/{id}/match”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
matchBill runs the 3-way match: each line against its PO line and what was received, within the price and freight tolerances in procurement settings.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/bills/<id>/match' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/bills/<id>/match' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/<id>/match"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/bills/<id>/match", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/<id>/match";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/bills/<id>/match");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/bills/{id}/void
Section titled “POST /api/v1/procurement/bills/{id}/void”POSTprocurement:approveshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
voidBill voids a bill that has not been exported.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, BillView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvedAt | string or null | |
approvedByName | string or null | |
billDaterequired | string | |
billNumberrequired | string | |
createdAtrequired | string | |
dueOn | string or null | |
exportBatch | string or null | |
exportedAt | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of BillLineView | |
lines[].amountCentsrequired | integer | int64. |
lines[].descriptionrequired | string | |
lines[].kindrequired | string | |
lines[].matchStaterequired | string | |
lines[].periodEnd | string or null | |
lines[].periodStart | string or null | |
lines[].poNumber | string or null | |
lines[].poQtyOrdered | string or null | |
lines[].poQtyReceived | string or null | |
lines[].poUnitCostCents | integer or null | int64. |
lines[].positionrequired | integer | |
lines[].proRatarequired | boolean | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderId | string or null | |
lines[].purchaseOrderLineId | string or null | |
lines[].qtyrequired | string | |
lines[].subscriptionExternalId | string or null | |
lines[].unitCostCentsrequired | integer | int64. |
lines[].varianceCentsrequired | integer | int64. |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sourcerequired | string | |
staterequired | string | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
varianceCentsrequired | integer | int64. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/bills/<id>/void' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/bills/<id>/void' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/<id>/void"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/bills/<id>/void", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/<id>/void";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/bills/<id>/void");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/bills/export.csv
Section titled “POST /api/v1/procurement/bills/export.csv”POSTprocurement:approveshared facehosteditmspIdempotentdownloadNot fully resolved
What this page does not know
- response
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
exportBills writes the payables CSV for approved bills and marks them exported under one batch.
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/bills/export.csv' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/bills/export.csv' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/bills/export.csv"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/bills/export.csv", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/bills/export.csv";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/bills/export.csv");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/purchase-orders
Section titled “GET /api/v1/procurement/purchase-orders”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listPurchaseOrders lists purchase orders, newest first by default.
Filters: q (PO number, supplier reference, supplier name), status (comma-separated), supplier, salesOrder, client (drop-ship or line client), origin.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
client | query | string | No | |
dir | query | string, one of asc, desc | No | Sort direction. |
origin | query | string | No | |
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
q | query | string | No | Free-text search term. |
salesOrder | query | string | No | |
sort | query | string, one of created, expected, number, total | No | Sort key. |
status | query | string, one of approved, cancelled, closed, draft, partially_received, pending_approval, received, sent, submitted | No | Comma-separated set. An unrecognised value is refused. |
supplier | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultPoSummaryView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of PoSummaryView | |
items[].createdAtrequired | string | |
items[].dropShipClientId | string or null | |
items[].dropShipClientName | string or null | |
items[].expectedOn | string or null | |
items[].locationId | string or null | |
items[].locationName | string or null | |
items[].originrequired | string | |
items[].poNumberrequired | string | |
items[].publicIdrequired | string | |
items[].shipToKindrequired | string | |
items[].statusrequired | string | |
items[].submissionStaterequired | string | |
items[].supplierIdrequired | string | |
items[].supplierNamerequired | string | |
items[].totalCentsrequired | integer | int64. |
items[].updatedAtrequired | string | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/purchase-orders?client=<client>&dir=asc&origin=<origin>&page=0&pageSize=0&q=<q>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders?client=<client>&dir=asc&origin=<origin>&page=0&pageSize=0&q=<q>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders"params = { "client": "<client>", "dir": "asc", "origin": "<origin>", "page": "0", "pageSize": "0", "q": "<q>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/purchase-orders?client=<client>&dir=asc&origin=<origin>&page=0&pageSize=0&q=<q>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/procurement/purchase-orders");url.searchParams.set("client", "<client>");url.searchParams.set("dir", "asc");url.searchParams.set("origin", "<origin>");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("q", "<q>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/purchase-orders?client=<client>&dir=asc&origin=<origin>&page=0&pageSize=0&q=<q>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders
Section titled “POST /api/v1/procurement/purchase-orders”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
createPurchaseOrder creates a draft purchase order and draws its number.
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/purchase-orders/{id}
Section titled “GET /api/v1/procurement/purchase-orders/{id}”GETprocurement:readshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
getPurchaseOrder reads one purchase order with its lines and shipments.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/procurement/purchase-orders/{id}
Section titled “PUT /api/v1/procurement/purchase-orders/{id}”PUTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
putPurchaseOrder replaces the document (rowVersion required).
Allowed in draft, pending approval and approved; any edit returns it to draft and clears the approval. 409 notEditable once it went to the supplier.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/procurement/purchase-orders/{id}
Section titled “DELETE /api/v1/procurement/purchase-orders/{id}”DELETEprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
deletePurchaseOrder deletes a draft that was never approved.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/approve
Section titled “POST /api/v1/procurement/purchase-orders/{id}/approve”POSTprocurement:approveshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
approvePO approves a purchase order waiting for approval.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/approve");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/cancel
Section titled “POST /api/v1/procurement/purchase-orders/{id}/cancel”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
cancelPO cancels a purchase order before anything was received and before a distributor accepted it.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/cancel");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/close
Section titled “POST /api/v1/procurement/purchase-orders/{id}/close”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
closePO closes a received or partly received purchase order; whatever has not arrived is cancelled.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/close");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/purchase-orders/{id}/pdf
Section titled “GET /api/v1/procurement/purchase-orders/{id}/pdf”GETprocurement:readshared facehosteditmspIdempotentdownloadNot fully resolved
What this page does not know
- response
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
purchaseOrderPDF renders the purchase order as a PDF.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/octet-stream, string (binary) | Success. The body shape was not resolved; see x-outpost-unresolved. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/pdf");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/purchase-orders/{id}/receipts
Section titled “GET /api/v1/procurement/purchase-orders/{id}/receipts”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listPOReceipts lists a purchase order’s receipts, oldest first.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, array of ReceiptView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
[].clientAssetsStaterequired | string | |
[].dropShiprequired | boolean | |
[].linesrequired | array of ReceiptLineView | |
[].lines[].assetIdsrequired | array of string | |
[].lines[].descriptionrequired | string | |
[].lines[].publicIdrequired | string | |
[].lines[].purchaseOrderLineIdrequired | string | |
[].lines[].qtyrequired | string | |
[].lines[].serialsrequired | array of string | |
[].lines[].unitCostCentsrequired | integer | int64. |
[].locationId | string or null | |
[].locationName | string or null | |
[].packingSliprequired | string | |
[].poNumberrequired | string | |
[].publicIdrequired | string | |
[].purchaseOrderIdrequired | string | |
[].receiptNumberrequired | string | |
[].receivedAtrequired | string | |
[].receivedByName | string or null | |
[].reverseReason | string or null | |
[].reversedAt | string or null | |
[].staterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/receipts
Section titled “POST /api/v1/procurement/purchase-orders/{id}/receipts”POSTprocurement:receiveshared facehosteditmsp
Source: [object Object]
postPOReceipt receives goods on a purchase order.
Idempotent by idempotencyKey: a repeat answers the first receipt. Serialized items need one serial per unit (422 serialCount); 409 overReceipt, duplicateSerial.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, ReceiptView | Created. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:receive. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
clientAssetsStaterequired | string | |
dropShiprequired | boolean | |
linesrequired | array of ReceiptLineView | |
lines[].assetIdsrequired | array of string | |
lines[].descriptionrequired | string | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderLineIdrequired | string | |
lines[].qtyrequired | string | |
lines[].serialsrequired | array of string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
packingSliprequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
purchaseOrderIdrequired | string | |
receiptNumberrequired | string | |
receivedAtrequired | string | |
receivedByName | string or null | |
reverseReason | string or null | |
reversedAt | string or null | |
staterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/receipts");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/reject
Section titled “POST /api/v1/procurement/purchase-orders/{id}/reject”POSTprocurement:approveshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
rejectPO returns a purchase order waiting for approval to draft.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/reject");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/request-approval
Section titled “POST /api/v1/procurement/purchase-orders/{id}/request-approval”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
requestPOApproval sends a draft for approval, or approves it at once when approval is off or the total is under the threshold.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/request-approval");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/send
Section titled “POST /api/v1/procurement/purchase-orders/{id}/send”POSTprocurement:writeshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
sendPO emails the purchase order PDF to the supplier and marks it sent.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
502 | application/problem+json, ProblemDetails | The mail provider did not accept the message. The purchase order is not marked sent. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.post(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/send");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/shipments
Section titled “POST /api/v1/procurement/purchase-orders/{id}/shipments”POSTprocurement:writeshared facehosteditmsp
Source: [object Object]
recordPOShipment records tracking (and optionally reported serials and backordered quantities, keyed by PO line) for a purchase order.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, PoShipmentView | Created. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
carrierrequired | string | |
createdAtrequired | string | |
estimatedDeliveryOn | string or null | |
publicIdrequired | string | |
serialsrequired | object | |
shippedAt | string or null | |
sourcerequired | string | |
trackingNumberrequired | string | |
trackingUrlrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/shipments");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/purchase-orders/{id}/submit
Section titled “POST /api/v1/procurement/purchase-orders/{id}/submit”POSTprocurement:approveshared facehosteditmspIdempotentNot fully resolved
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
submitPO queues an approved purchase order for submission to its distributor.
Needs confirm true and the total the person reviewed; 409 liveDisabled, totalChanged or notApproved. The worker places the order.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PoView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalRequestedAt | string or null | |
approvedAt | string or null | |
approvedByName | string or null | |
cancelledAt | string or null | |
closedAt | string or null | |
connectorId | string or null | |
connectorLiverequired | boolean | |
connectorName | string or null | |
createdAtrequired | string | |
dropShipClientId | string or null | |
dropShipClientName | string or null | |
dropShipSiteId | string or null | |
expectedOn | string or null | |
externalOrderId | string or null | |
freightCentsrequired | integer | int64. |
linesrequired | array of PoLineView | |
lines[].clientId | string or null | |
lines[].clientName | string or null | |
lines[].descriptionrequired | string | |
lines[].expectedOn | string or null | |
lines[].kindrequired | string | |
lines[].mpnrequired | string | |
lines[].positionrequired | integer | |
lines[].publicIdrequired | string | |
lines[].qtyBackorderedrequired | string | |
lines[].qtyCancelledrequired | string | |
lines[].qtyOrderedrequired | string | |
lines[].qtyReceivedrequired | string | |
lines[].rowVersionrequired | integer | int64. |
lines[].salesOrderId | string or null | |
lines[].salesOrderLineId | string or null | |
lines[].salesOrderNumber | string or null | |
lines[].serializedrequired | boolean | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
lines[].supplierSkurequired | string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
needsApprovalrequired | boolean | |
notesrequired | string | |
originrequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
sentAt | string or null | |
shipToKindrequired | string | |
shipmentsrequired | array of PoShipmentView | |
shipments[].carrierrequired | string | |
shipments[].createdAtrequired | string | |
shipments[].estimatedDeliveryOn | string or null | |
shipments[].publicIdrequired | string | |
shipments[].serialsrequired | object | |
shipments[].shippedAt | string or null | |
shipments[].sourcerequired | string | |
shipments[].trackingNumberrequired | string | |
shipments[].trackingUrlrequired | string | |
statusrequired | string | |
statusPolledAt | string or null | |
submissionAttemptsrequired | integer | |
submissionErrorrequired | string | |
submissionStaterequired | string | |
submitConfirmedAt | string or null | |
submitExpectedTotalCents | integer or null | int64. |
submittedAt | string or null | |
submittedByName | string or null | |
subtotalCentsrequired | integer | int64. |
supplierIdrequired | string | |
supplierNamerequired | string | |
supplierReferencerequired | string | |
taxCentsrequired | integer | int64. |
totalCentsrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/purchase-orders/<id>/submit");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/receipts/{id}
Section titled “GET /api/v1/procurement/receipts/{id}”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
getReceipt reads one receipt.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ReceiptView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
clientAssetsStaterequired | string | |
dropShiprequired | boolean | |
linesrequired | array of ReceiptLineView | |
lines[].assetIdsrequired | array of string | |
lines[].descriptionrequired | string | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderLineIdrequired | string | |
lines[].qtyrequired | string | |
lines[].serialsrequired | array of string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
packingSliprequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
purchaseOrderIdrequired | string | |
receiptNumberrequired | string | |
receivedAtrequired | string | |
receivedByName | string or null | |
reverseReason | string or null | |
reversedAt | string or null | |
staterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/receipts/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/receipts/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/receipts/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/receipts/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/receipts/<id>";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/receipts/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/receipts/{id}/reverse
Section titled “POST /api/v1/procurement/receipts/{id}/reverse”POSTprocurement:receiveshared facehosteditmspIdempotent
Source: [object Object]
reverseReceipt reverses a receipt: stock comes back out and its assets are removed.
409 assetsMoved, insufficientStock, alreadyReversed.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ReceiptView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:receive. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
clientAssetsStaterequired | string | |
dropShiprequired | boolean | |
linesrequired | array of ReceiptLineView | |
lines[].assetIdsrequired | array of string | |
lines[].descriptionrequired | string | |
lines[].publicIdrequired | string | |
lines[].purchaseOrderLineIdrequired | string | |
lines[].qtyrequired | string | |
lines[].serialsrequired | array of string | |
lines[].unitCostCentsrequired | integer | int64. |
locationId | string or null | |
locationName | string or null | |
packingSliprequired | string | |
poNumberrequired | string | |
publicIdrequired | string | |
purchaseOrderIdrequired | string | |
receiptNumberrequired | string | |
receivedAtrequired | string | |
receivedByName | string or null | |
reverseReason | string or null | |
reversedAt | string or null | |
staterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X POST 'https://depot.example.com/api/v1/procurement/receipts/<id>/reverse' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/receipts/<id>/reverse' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/receipts/<id>/reverse"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/receipts/<id>/reverse", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/receipts/<id>/reverse";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/receipts/<id>/reverse");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/settings
Section titled “GET /api/v1/procurement/settings”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
getProcSettings reads the procurement settings: number prefixes, the PO approval threshold (null turns approval off), match tolerances and the refresh age.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ProcSettingsView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalMinTotalCents | integer or null | int64. |
defaultLocationId | string or null | |
freightToleranceCentsrequired | integer | int64. |
poPrefixrequired | string | |
priceToleranceBasisPointsrequired | integer | |
receiptPrefixrequired | string | |
refreshAgeMonthsrequired | integer | |
reorderEnabledrequired | boolean | |
rmaPrefixrequired | string | |
rowVersionrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/settings' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/settings' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/settings", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/settings";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/settings");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/procurement/settings
Section titled “PUT /api/v1/procurement/settings”PUTprocurement:approveshared facehosteditmspIdempotent
Source: [object Object]
putProcSettings replaces the procurement settings (rowVersion required; 412 when stale).
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ProcSettingsView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:approve. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
approvalMinTotalCents | integer or null | int64. |
defaultLocationId | string or null | |
freightToleranceCentsrequired | integer | int64. |
poPrefixrequired | string | |
priceToleranceBasisPointsrequired | integer | |
receiptPrefixrequired | string | |
refreshAgeMonthsrequired | integer | |
reorderEnabledrequired | boolean | |
rmaPrefixrequired | string | |
rowVersionrequired | integer | int64. |
updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/procurement/settings' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/procurement/settings' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/settings"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/procurement/settings", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/settings";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/procurement/settings");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/suppliers
Section titled “GET /api/v1/procurement/suppliers”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listSuppliers lists suppliers by name.
q matches the name or account number; includeInactive=1 adds inactive ones.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
includeInactive | query | string | No | |
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
q | query | string | No | Free-text search term. |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultSupplierView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
itemsrequired | array of SupplierView | |
items[].accountNumberrequired | string | |
items[].activerequired | boolean | |
items[].createdAtrequired | string | |
items[].currencyCoderequired | string | |
items[].distributorConnectorId | string or null | |
items[].distributorConnectorName | string or null | |
items[].emailrequired | string | |
items[].namerequired | string | |
items[].phonerequired | string | |
items[].publicIdrequired | string | |
items[].rowVersionrequired | integer | int64. |
items[].termsrequired | string | |
items[].updatedAtrequired | string | |
items[].websiterequired | string | |
pagerequired | integer | |
pageSizerequired | integer | |
totalrequired | integer |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/suppliers?includeInactive=<includeInactive>&page=0&pageSize=0&q=<q>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers?includeInactive=<includeInactive>&page=0&pageSize=0&q=<q>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers"params = { "includeInactive": "<includeInactive>", "page": "0", "pageSize": "0", "q": "<q>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/suppliers?includeInactive=<includeInactive>&page=0&pageSize=0&q=<q>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/procurement/suppliers");url.searchParams.set("includeInactive", "<includeInactive>");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("q", "<q>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/suppliers?includeInactive=<includeInactive>&page=0&pageSize=0&q=<q>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/procurement/suppliers
Section titled “POST /api/v1/procurement/suppliers”POSTprocurement:writeshared facehosteditmsp
Source: [object Object]
createSupplier adds a supplier.
409 nameTaken when a live supplier already has the name.
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
201 | application/json, SupplierView | Created. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
201 response body
| Field | Type | Description |
|---|---|---|
accountNumberrequired | string | |
activerequired | boolean | |
createdAtrequired | string | |
currencyCoderequired | string | |
distributorConnectorId | string or null | |
distributorConnectorName | string or null | |
emailrequired | string | |
namerequired | string | |
phonerequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
termsrequired | string | |
updatedAtrequired | string | |
websiterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/procurement/suppliers' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/procurement/suppliers", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/suppliers";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/procurement/suppliers");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/suppliers/{id}
Section titled “GET /api/v1/procurement/suppliers/{id}”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
getSupplier reads one supplier.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, SupplierView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
accountNumberrequired | string | |
activerequired | boolean | |
createdAtrequired | string | |
currencyCoderequired | string | |
distributorConnectorId | string or null | |
distributorConnectorName | string or null | |
emailrequired | string | |
namerequired | string | |
phonerequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
termsrequired | string | |
updatedAtrequired | string | |
websiterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/suppliers/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/suppliers/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/suppliers/<id>";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/suppliers/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PATCH /api/v1/procurement/suppliers/{id}
Section titled “PATCH /api/v1/procurement/suppliers/{id}”PATCHprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
patchSupplier changes the fields sent.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
The body is any.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, SupplierView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
accountNumberrequired | string | |
activerequired | boolean | |
createdAtrequired | string | |
currencyCoderequired | string | |
distributorConnectorId | string or null | |
distributorConnectorName | string or null | |
emailrequired | string | |
namerequired | string | |
phonerequired | string | |
publicIdrequired | string | |
rowVersionrequired | integer | int64. |
termsrequired | string | |
updatedAtrequired | string | |
websiterequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PATCH 'https://depot.example.com/api/v1/procurement/suppliers/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '"string"'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'"string"'@
$response = Invoke-RestMethod ` -Method Patch ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers/<id>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = "string"
response = requests.patch(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`"string"`)
req, err := http.NewRequest(http.MethodPatch, "https://depot.example.com/api/v1/procurement/suppliers/<id>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/suppliers/<id>";
const response = await fetch(url, { method: "PATCH", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify("string"),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """"string"""";
var request = new HttpRequestMessage(HttpMethod.Patch, "https://depot.example.com/api/v1/procurement/suppliers/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/procurement/suppliers/{id}
Section titled “DELETE /api/v1/procurement/suppliers/{id}”DELETEprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
archiveSupplier archives a supplier.
409 supplierInUse while an open purchase order names it.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:write. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/procurement/suppliers/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/procurement/suppliers/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/suppliers/<id>";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/procurement/suppliers/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/procurement/suppliers/{id}/items
Section titled “GET /api/v1/procurement/suppliers/{id}/items”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listSupplierPriceList lists every stock item one supplier sells, by item name, with the supplier’s part number, cost and lead time.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, array of SupplierPriceView | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | No signed-in identity. |
403 | application/problem+json, ProblemDetails | The identity does not hold procurement:read. |
404 | application/problem+json, ProblemDetails | No resource matches. |
409 | application/problem+json, ProblemDetails | The request conflicts with the current state of the record. |
412 | application/problem+json, ProblemDetails | Someone else changed this since you opened it. Reload and try again. |
500 | application/problem+json, ProblemDetails | The request failed. |
503 | application/problem+json, ProblemDetails | This Depot has no home database for this request yet. |
200 response body
| Field | Type | Description |
|---|---|---|
[].costCentsrequired | integer | int64. |
[].leadDaysrequired | integer | |
[].publicIdrequired | string | |
[].rowVersionrequired | integer | int64. |
[].stockItemIdrequired | string | |
[].stockItemNamerequired | string | |
[].stockItemSkurequired | string | |
[].supplierSkurequired | string | |
[].updatedAtrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/procurement/suppliers/<id>/items' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/procurement/suppliers/<id>/items' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/procurement/suppliers/<id>/items"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/procurement/suppliers/<id>/items", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/procurement/suppliers/<id>/items";
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/procurement/suppliers/<id>/items");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.