Depot procurement rmas
Mounts the /procurement/rmas routes.
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/procurement/rmas
Section titled “GET /api/v1/procurement/rmas”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
listRmas lists returns to vendor, newest first.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
page | query | integer | No | One-based page number. Defaults to 1. |
pageSize | query | integer | No | Rows per page, 1 to 200. Defaults to 50. |
state | query | string, one of cancelled, closed, credited, open, repaired, replaced, shipped | No | Comma-separated set. An unrecognised value is refused. |
supplier | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, PagedResultRmaView | 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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 RmaView | |
items[].closedAt | string (date-time) or null | |
items[].createdAtrequired | string (date-time) | |
items[].creditCentsrequired | integer | int64. |
items[].fromLocationId | string or null | |
items[].linesrequired | array of RmaLineView | |
items[].lines[].assetId | string or null | |
items[].lines[].assetName | string or null | |
items[].lines[].assetSerial | string or null | |
items[].lines[].dispositionrequired | string | |
items[].lines[].publicIdrequired | string | |
items[].lines[].qtyrequired | string | |
items[].lines[].replacementAssetId | string or null | |
items[].lines[].stockItemId | string or null | |
items[].lines[].stockItemSku | string or null | |
items[].publicIdrequired | string | |
items[].reasonrequired | string | |
items[].rmaNumberrequired | string | |
items[].rowVersionrequired | integer | int64. |
items[].shippedAt | string (date-time) or null | |
items[].staterequired | string | |
items[].supplierIdrequired | string | |
items[].supplierNamerequired | string | |
items[].vendorRmaNumberrequired | 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/rmas?page=0&pageSize=0&state=cancelled&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/rmas?page=0&pageSize=0&state=cancelled&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/rmas"params = { "page": "0", "pageSize": "0", "state": "cancelled", "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/rmas?page=0&pageSize=0&state=cancelled&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/rmas");url.searchParams.set("page", "0");url.searchParams.set("pageSize", "0");url.searchParams.set("state", "cancelled");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/rmas?page=0&pageSize=0&state=cancelled&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/rmas
Section titled “POST /api/v1/procurement/rmas”POSTprocurement:writeshared facehosteditmsp
Source: [object Object]
createRma opens a return to vendor.
Practice-held units on it leave stock now.
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, RmaView | 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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas' \ -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/rmas' ` -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/rmas"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/rmas", 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/rmas";
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/rmas");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/rmas/{id}
Section titled “GET /api/v1/procurement/rmas/{id}”GETprocurement:readshared facehosteditmspIdempotent
Source: [object Object]
getRma reads one return with its lines.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, RmaView | Success. |
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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/{id}
Section titled “PUT /api/v1/procurement/rmas/{id}”PUTprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
updateRma edits a return’s header: vendor RMA number, reason and, while open, supplier and location.
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, RmaView | 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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/<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/rmas/{id}/close
Section titled “POST /api/v1/procurement/rmas/{id}/close”POSTprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
closeRma closes a return: credited, replaced, repaired or closed once shipped and resolved, or cancelled while open.
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, RmaView | 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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas/<id>/close' \ -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/rmas/<id>/close' ` -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/rmas/<id>/close"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/rmas/<id>/close", 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/rmas/<id>/close";
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/rmas/<id>/close");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/rmas/{id}/lines/{lineId}/resolve
Section titled “POST /api/v1/procurement/rmas/{id}/lines/{lineId}/resolve”POSTprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
resolveRmaLine records what the vendor did with one line: credit, replace, repair or scrap.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
lineId | 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, RmaView | 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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas/<id>/lines/<lineId>/resolve' \ -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/rmas/<id>/lines/<lineId>/resolve' ` -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/rmas/<id>/lines/<lineId>/resolve"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/rmas/<id>/lines/<lineId>/resolve", 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/rmas/<id>/lines/<lineId>/resolve";
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/rmas/<id>/lines/<lineId>/resolve");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/rmas/{id}/ship
Section titled “POST /api/v1/procurement/rmas/{id}/ship”POSTprocurement:writeshared facehosteditmspIdempotent
Source: [object Object]
shipRma marks an open return shipped; stock lines leave their location.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, RmaView | Success. |
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 | That change conflicts with the current state. |
412 | application/problem+json, ProblemDetails | This record changed since it was read. 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 |
|---|---|---|
closedAt | string (date-time) or null | |
createdAtrequired | string (date-time) | |
creditCentsrequired | integer | int64. |
fromLocationId | string or null | |
linesrequired | array of RmaLineView | |
lines[].assetId | string or null | |
lines[].assetName | string or null | |
lines[].assetSerial | string or null | |
lines[].dispositionrequired | string | |
lines[].publicIdrequired | string | |
lines[].qtyrequired | string | |
lines[].replacementAssetId | string or null | |
lines[].stockItemId | string or null | |
lines[].stockItemSku | string or null | |
publicIdrequired | string | |
reasonrequired | string | |
rmaNumberrequired | string | |
rowVersionrequired | integer | int64. |
shippedAt | string (date-time) or null | |
staterequired | string | |
supplierIdrequired | string | |
supplierNamerequired | string | |
vendorRmaNumberrequired | 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/rmas/<id>/ship' \ -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/rmas/<id>/ship' ` -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/rmas/<id>/ship"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/rmas/<id>/ship", 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/rmas/<id>/ship";
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/rmas/<id>/ship");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.