Skip to content

Depot portal billing

Registers the billing routes behind the org middleware.

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/portal/v1/orgs/{clientID}/autopay

Section titled “GET /api/portal/v1/orgs/{clientID}/autopay”

GETportal:autopay:manageportal facemspIdempotent

Source: [object Object]

getAutopay is whether automatic payments are on, with the authorization as agreed, and what enrolling would offer.

NameInTypeRequiredDescription
clientIDpathstringYes
StatusBodyDescription
200application/json, PortalAutopaySuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:autopay:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
authorizationPortalAuthorization

PortalAuthorization is an autopay authorization as agreed: the exact text, who authorized it, when and how.

authorization.authorizedAtrequiredstring (date-time)
authorization.authorizedByNamerequiredstring
authorization.authorizedViarequiredstring
authorization.consentTextrequiredstring
authorization.consentVersionrequiredstring
authorization.idrequiredstring
authorization.methodIdrequiredstring
authorization.methodLabelrequiredstring
authorization.revokedAtstring (date-time) or null
authorization.revokedViarequiredstring
authorization.statusrequiredstring
availablerequiredboolean
consentVersionrequiredstring
enrolledrequiredboolean
methodsrequiredarray of string
surchargerequiredSurchargeRule

SurchargeRule is what the pay page states BEFORE a method is picked.

surcharge.basisPointsrequiredinteger
surcharge.creditOnlyrequiredboolean
surcharge.enabledrequiredboolean
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/autopay' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

PUT /api/portal/v1/orgs/{clientID}/autopay

Section titled “PUT /api/portal/v1/orgs/{clientID}/autopay”

PUTportal:autopay:manageportal facemspIdempotent

Source: [object Object]

enrollAutopay creates the authorization the member accepted, with the text they read (a changed text is 409 quote_changed), recording the member as the authorizing person.

A copy and a one-click revoke link are mailed.

NameInTypeRequiredDescription
clientIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalSetupResultSuccess.
201application/json, PortalEnrolResultCreated.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:autopay:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
methodPortalSavedMethod

PortalSavedMethod is a payment method on file.

method.autopayrequiredboolean
method.bankNamerequiredstring
method.brandrequiredstring
method.createdAtrequiredstring (date-time)
method.expMonthrequiredinteger
method.expYearrequiredinteger
method.fundingrequiredstring
method.idrequiredstring
method.labelrequiredstring
method.last4requiredstring
method.statusrequiredstring
method.typerequiredstring
nextActionrequiredany

Arbitrary JSON.

setupRefrequiredstring
statusrequiredstring
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/autopay' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

DELETE /api/portal/v1/orgs/{clientID}/autopay

Section titled “DELETE /api/portal/v1/orgs/{clientID}/autopay”

DELETEportal:autopay:manageportal facemspIdempotent

Source: [object Object]

revokeAutopay stops automatic payments before the next charge.

The billing contact is mailed a confirmation. 404 when autopay is off.

NameInTypeRequiredDescription
clientIDpathstringYes
StatusBodyDescription
200application/json, PortalAuthorizationSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:autopay:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
authorizedAtrequiredstring (date-time)
authorizedByNamerequiredstring
authorizedViarequiredstring
consentTextrequiredstring
consentVersionrequiredstring
idrequiredstring
methodIdrequiredstring
methodLabelrequiredstring
revokedAtstring (date-time) or null
revokedViarequiredstring
statusrequiredstring
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/autopay' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

POST /api/portal/v1/orgs/{clientID}/autopay/preview

Section titled “POST /api/portal/v1/orgs/{clientID}/autopay/preview”

POSTportal:autopay:manageportal facemsp

Source: [object Object]

autopayPreview returns the authorization text for the tokenized method, naming the signed-in member as the person authorizing.

Reading it is its own step, never a checkbox on a payment (NACHA).

NameInTypeRequiredDescription
clientIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalConsentSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:autopay:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
methodLabelrequiredstring
payerNamerequiredstring
sha256requiredstring
textrequiredstring
versionrequiredstring
Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/autopay/preview' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

POST /api/portal/v1/orgs/{clientID}/autopay/session

Section titled “POST /api/portal/v1/orgs/{clientID}/autopay/session”

POSTportal:autopay:manageportal facemsp

Source: [object Object]

autopaySession is the hosted fields in set-up mode for the method autopay will charge.

NameInTypeRequiredDescription
clientIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalPaySessionSuccess.
400application/problem+json, ProblemDetailsThe request body is not acceptable.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:autopay:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
amountCentsrequiredinteger

int64.

configIdrequiredstring
currencyCoderequiredstring
methodsrequiredarray of string
providerKindrequiredstring
publicrequiredany

Arbitrary JSON.

savedMethodsrequiredarray of PortalSavedMethod
savedMethods[].autopayrequiredboolean
savedMethods[].bankNamerequiredstring
savedMethods[].brandrequiredstring
savedMethods[].createdAtrequiredstring (date-time)
savedMethods[].expMonthrequiredinteger
savedMethods[].expYearrequiredinteger
savedMethods[].fundingrequiredstring
savedMethods[].idrequiredstring
savedMethods[].labelrequiredstring
savedMethods[].last4requiredstring
savedMethods[].statusrequiredstring
savedMethods[].typerequiredstring
scriptrequiredstring
surchargerequiredSurchargeRule

SurchargeRule is what the pay page states BEFORE a method is picked.

surcharge.basisPointsrequiredinteger
surcharge.creditOnlyrequiredboolean
surcharge.enabledrequiredboolean
Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/autopay/session' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

GET /api/portal/v1/orgs/{clientID}/estimate

Section titled “GET /api/portal/v1/orgs/{clientID}/estimate”

GETportal:estimate:readportal facemspIdempotent

Source: [object Object]

getEstimate is the next bill on the client’s active agreement: each line with the devices and people it counts, what changed since the last invoice, when the counts were taken, and the period.

Devices no line bills are the MSP’s concern and are not listed. 404 when the client is on no agreement.

NameInTypeRequiredDescription
clientIDpathstringYes
StatusBodyDescription
200application/json, PortalEstimateSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:estimate:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
agreementNamerequiredstring
countsTakenAtrequiredstring (date-time)
currencyCoderequiredstring
diffrequiredarray of PortalEstimateDiff
diff[].addedrequiredarray of PortalMember
diff[].added[].idrequiredstring
diff[].added[].namerequiredstring
diff[].deltaCentsrequiredinteger

int64.

diff[].descriptionrequiredstring
diff[].qtyAfterrequiredstring
diff[].qtyBeforestring or null
diff[].removedrequiredarray of PortalMember
diff[].removed[].idrequiredstring
diff[].removed[].namerequiredstring
linesrequiredarray of PortalEstimateLine
lines[].amountCentsrequiredinteger

int64.

lines[].descriptionrequiredstring
lines[].kindrequiredstring
lines[].membersrequiredarray of PortalMember
lines[].members[].idrequiredstring
lines[].members[].namerequiredstring
lines[].methodstring or null
lines[].quantityrequiredstring
lines[].unitAmountCentsrequiredinteger

int64.

periodEndrequiredstring
periodStartrequiredstring
previousInvoiceIdstring or null
proratedrequiredboolean
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

totalCentsrequiredinteger

int64.

warningsrequiredarray of string
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/estimate' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GET /api/portal/v1/orgs/{clientID}/invoices

Section titled “GET /api/portal/v1/orgs/{clientID}/invoices”

GETportal:invoices:readportal facemspIdempotent

Source: [object Object]

listInvoices is the client’s invoices, newest first, filtered by status (“open” for what is owed), issue date and number.

NameInTypeRequiredDescription
clientIDpathstringYes
pagequerystringNo
pageSizequerystringNo
qquerystringNo
statusquerystringNo
StatusBodyDescription
200application/json, PagePortalInvoiceSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
itemsrequiredarray of PortalInvoice
items[].balanceCentsrequiredinteger

int64.

items[].creditedCentsrequiredinteger

int64.

items[].currencyCoderequiredstring
items[].dueDatestring or null
items[].idrequiredstring
items[].issueDatestring or null
items[].numberrequiredstring
items[].paidCentsrequiredinteger

int64.

items[].payablerequiredboolean
items[].paymentStaterequiredstring, one of none, paid, processing
items[].pendingCentsrequiredinteger

int64.

items[].periodEndstring or null
items[].periodStartstring or null
items[].statusrequiredstring, one of issued, paid, partial, past_due, sent, void
items[].subtotalCentsrequiredinteger

int64.

items[].taxCentsrequiredinteger

int64.

items[].totalCentsrequiredinteger

int64.

pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/invoices?page=<page>&pageSize=<pageSize>&q=<q>&status=<status>' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}

Section titled “GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}”

GETportal:invoices:readportal facemspIdempotent

Source: [object Object]

getInvoice is one invoice: its lines with the devices and people each counted line was billed for, its payments (online and recorded by the MSP), credit notes, and any payment still processing.

NameInTypeRequiredDescription
clientIDpathstringYes
invoiceIDpathstringYes
StatusBodyDescription
200application/json, PortalInvoiceDetailSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
balanceCentsrequiredinteger

int64.

creditNotesrequiredarray of PortalCreditNote
creditNotes[].idrequiredstring
creditNotes[].issueDatestring or null
creditNotes[].kindrequiredstring
creditNotes[].numberrequiredstring
creditNotes[].reasonrequiredstring
creditNotes[].statusrequiredstring
creditNotes[].totalCentsrequiredinteger

int64.

creditedCentsrequiredinteger

int64.

currencyCoderequiredstring
dueDatestring or null
idrequiredstring
inFlightPortalAttempt

PortalAttempt is one online payment attempt as the payer sees it.

inFlight.amountCentsrequiredinteger

int64.

inFlight.chargedCentsrequiredinteger

int64.

inFlight.idrequiredstring
inFlight.messagerequiredstring
inFlight.methodTyperequiredstring
inFlight.statusrequiredstring
inFlight.surchargeCentsrequiredinteger

int64.

issueDatestring or null
linesrequiredarray of PortalInvoiceLine
lines[].amountCentsrequiredinteger

int64.

lines[].descriptionrequiredstring
lines[].idrequiredstring
lines[].kindrequiredstring
lines[].quantityrequiredstring
lines[].receiptPortalReceipt

PortalReceipt is a counted line's receipt of quantities.

lines[].receipt.countrequiredinteger
lines[].receipt.membersrequiredarray of PortalMember
lines[].receipt.members[].idrequiredstring
lines[].receipt.members[].namerequiredstring
lines[].receipt.methodstring, one of daily, peak, snapshot or null
lines[].unitAmountCentsrequiredinteger

int64.

notesrequiredstring
numberrequiredstring
paidCentsrequiredinteger

int64.

payablerequiredboolean
paymentStaterequiredstring, one of none, paid, processing
paymentsrequiredarray of PortalPaymentRow
payments[].amountCentsrequiredinteger

int64.

payments[].autopayrequiredboolean
payments[].currencyCoderequiredstring
payments[].declineReasonrequiredstring
payments[].idrequiredstring
payments[].invoiceIdrequiredstring
payments[].invoiceNumberrequiredstring
payments[].methodrequiredstring, one of ach, card, check, other
payments[].methodLabelrequiredstring
payments[].occurredAtrequiredstring (date-time)
payments[].onlinerequiredboolean
payments[].receiptAvailablerequiredboolean
payments[].referencerequiredstring
payments[].statusrequiredstring, one of canceled, failed, paid, pending, processing, requires_action, returned, void
payments[].surchargeCentsrequiredinteger

int64.

pdfAvailablerequiredboolean
pendingCentsrequiredinteger

int64.

periodEndstring or null
periodStartstring or null
statusrequiredstring, one of issued, paid, partial, past_due, sent, void
subtotalCentsrequiredinteger

int64.

taxCentsrequiredinteger

int64.

totalCentsrequiredinteger

int64.

Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/invoices/<invoiceID>' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/attempts/{attemptID}

Section titled “GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/attempts/{attemptID}”

GETportal:invoices:readportal facemspIdempotent

Source: [object Object]

getPayAttempt polls one payment attempt of this invoice; while it is in flight the processor is asked, so the page does not wait on a webhook.

NameInTypeRequiredDescription
attemptIDpathstringYes
clientIDpathstringYes
invoiceIDpathstringYes
StatusBodyDescription
200application/json, PortalAttemptSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
amountCentsrequiredinteger

int64.

chargedCentsrequiredinteger

int64.

idrequiredstring
messagerequiredstring
methodTyperequiredstring
statusrequiredstring
surchargeCentsrequiredinteger

int64.

Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/invoices/<invoiceID>/attempts/<attemptID>' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay

Section titled “POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay”

POSTportal:invoices:payportal facemsp

Source: [object Object]

payConfirm takes the payment: the figures are quoted again (a change is 409 quote_changed), the attempt is written, then the processor is called.

The member is recorded as who paid.

NameInTypeRequiredDescription
clientIDpathstringYes
invoiceIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalPayResultSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:pay.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
attemptrequiredPortalAttempt

PortalAttempt is one online payment attempt as the payer sees it.

attempt.amountCentsrequiredinteger

int64.

attempt.chargedCentsrequiredinteger

int64.

attempt.idrequiredstring
attempt.messagerequiredstring
attempt.methodTyperequiredstring
attempt.statusrequiredstring
attempt.surchargeCentsrequiredinteger

int64.

nextActionrequiredany

Arbitrary JSON.

Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/invoices/<invoiceID>/pay' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay/quote

Section titled “POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay/quote”

POSTportal:invoices:payportal facemsp

Source: [object Object]

payQuote prices the chosen method: the balance and, for a credit card where the practice allows it, the surcharge on its own line, before the payer confirms.

NameInTypeRequiredDescription
clientIDpathstringYes
invoiceIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalPayQuoteSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:pay.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
amountCentsrequiredinteger

int64.

chargedCentsrequiredinteger

int64.

configIdrequiredstring
currencyCoderequiredstring
fundingrequiredstring
methodLabelrequiredstring
methodTyperequiredstring
savedMethodIdrequiredstring
surchargeBasisPointsrequiredinteger
surchargeCentsrequiredinteger

int64.

Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/invoices/<invoiceID>/pay/quote' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay/session

Section titled “POST /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pay/session”

POSTportal:invoices:payportal facemsp

Source: [object Object]

paySession starts paying an invoice: the processor’s browser configuration, the methods offered, the surcharge rule, and the saved methods that can pay it.

NameInTypeRequiredDescription
clientIDpathstringYes
invoiceIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalPaySessionSuccess.
400application/problem+json, ProblemDetailsThe request body is not acceptable.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:pay.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
amountCentsrequiredinteger

int64.

configIdrequiredstring
currencyCoderequiredstring
methodsrequiredarray of string
providerKindrequiredstring
publicrequiredany

Arbitrary JSON.

savedMethodsrequiredarray of PortalSavedMethod
savedMethods[].autopayrequiredboolean
savedMethods[].bankNamerequiredstring
savedMethods[].brandrequiredstring
savedMethods[].createdAtrequiredstring (date-time)
savedMethods[].expMonthrequiredinteger
savedMethods[].expYearrequiredinteger
savedMethods[].fundingrequiredstring
savedMethods[].idrequiredstring
savedMethods[].labelrequiredstring
savedMethods[].last4requiredstring
savedMethods[].statusrequiredstring
savedMethods[].typerequiredstring
scriptrequiredstring
surchargerequiredSurchargeRule

SurchargeRule is what the pay page states BEFORE a method is picked.

surcharge.basisPointsrequiredinteger
surcharge.creditOnlyrequiredboolean
surcharge.enabledrequiredboolean
Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/invoices/<invoiceID>/pay/session' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pdf

Section titled “GET /api/portal/v1/orgs/{clientID}/invoices/{invoiceID}/pdf”

GETportal:invoices:readportal facemspIdempotentdownloadNot 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]

invoicePdf is the invoice document as issued, named by its number.

NameInTypeRequiredDescription
clientIDpathstringYes
invoiceIDpathstringYes
StatusBodyDescription
200application/octet-stream, string (binary)Success. The body shape was not resolved; see x-outpost-unresolved.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/invoices/<invoiceID>/pdf' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GET /api/portal/v1/orgs/{clientID}/payment-methods

Section titled “GET /api/portal/v1/orgs/{clientID}/payment-methods”

GETportal:payment_methods:manageportal facemspIdempotent

Source: [object Object]

listPaymentMethods is the org’s payment methods on file and what can be added.

NameInTypeRequiredDescription
clientIDpathstringYes
StatusBodyDescription
200application/json, PortalMethodsOfferSuccess.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:payment_methods:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
canAddrequiredboolean
itemsrequiredarray of PortalSavedMethod
items[].autopayrequiredboolean
items[].bankNamerequiredstring
items[].brandrequiredstring
items[].createdAtrequiredstring (date-time)
items[].expMonthrequiredinteger
items[].expYearrequiredinteger
items[].fundingrequiredstring
items[].idrequiredstring
items[].labelrequiredstring
items[].last4requiredstring
items[].statusrequiredstring
items[].typerequiredstring
methodsrequiredarray of string
surchargerequiredSurchargeRule

SurchargeRule is what the pay page states BEFORE a method is picked.

surcharge.basisPointsrequiredinteger
surcharge.creditOnlyrequiredboolean
surcharge.enabledrequiredboolean
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/payment-methods' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

POST /api/portal/v1/orgs/{clientID}/payment-methods

Section titled “POST /api/portal/v1/orgs/{clientID}/payment-methods”

POSTportal:payment_methods:manageportal facemsp

Source: [object Object]

addPaymentMethod keeps the tokenized method on file.

It authorizes no automatic payment: autopay is its own consented step.

NameInTypeRequiredDescription
clientIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalSetupResultSuccess.
201application/json, PortalSetupResultCreated.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:payment_methods:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
methodPortalSavedMethod

PortalSavedMethod is a payment method on file.

method.autopayrequiredboolean
method.bankNamerequiredstring
method.brandrequiredstring
method.createdAtrequiredstring (date-time)
method.expMonthrequiredinteger
method.expYearrequiredinteger
method.fundingrequiredstring
method.idrequiredstring
method.labelrequiredstring
method.last4requiredstring
method.statusrequiredstring
method.typerequiredstring
nextActionrequiredany

Arbitrary JSON.

setupRefrequiredstring
statusrequiredstring
Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/payment-methods' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

DELETE /api/portal/v1/orgs/{clientID}/payment-methods/{methodID}

Section titled “DELETE /api/portal/v1/orgs/{clientID}/payment-methods/{methodID}”

DELETEportal:payment_methods:manageportal facemspIdempotent

Source: [object Object]

removePaymentMethod takes a method off file.

If automatic payments charge it, they stop too, and the billing contact is told.

NameInTypeRequiredDescription
clientIDpathstringYes
methodIDpathstringYes
StatusBodyDescription
204NoneSuccess, with no body.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:payment_methods:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/payment-methods/<methodID>' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

POST /api/portal/v1/orgs/{clientID}/payment-methods/session

Section titled “POST /api/portal/v1/orgs/{clientID}/payment-methods/session”

POSTportal:payment_methods:manageportal facemsp

Source: [object Object]

paymentMethodSession starts adding a payment method: the processor’s hosted fields in set-up mode.

NameInTypeRequiredDescription
clientIDpathstringYes

Required, sent as application/json.

The body is any.

StatusBodyDescription
200application/json, PortalPaySessionSuccess.
400application/problem+json, ProblemDetailsThe request body is not acceptable.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:payment_methods:manage.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
amountCentsrequiredinteger

int64.

configIdrequiredstring
currencyCoderequiredstring
methodsrequiredarray of string
providerKindrequiredstring
publicrequiredany

Arbitrary JSON.

savedMethodsrequiredarray of PortalSavedMethod
savedMethods[].autopayrequiredboolean
savedMethods[].bankNamerequiredstring
savedMethods[].brandrequiredstring
savedMethods[].createdAtrequiredstring (date-time)
savedMethods[].expMonthrequiredinteger
savedMethods[].expYearrequiredinteger
savedMethods[].fundingrequiredstring
savedMethods[].idrequiredstring
savedMethods[].labelrequiredstring
savedMethods[].last4requiredstring
savedMethods[].statusrequiredstring
savedMethods[].typerequiredstring
scriptrequiredstring
surchargerequiredSurchargeRule

SurchargeRule is what the pay page states BEFORE a method is picked.

surcharge.basisPointsrequiredinteger
surcharge.creditOnlyrequiredboolean
surcharge.enabledrequiredboolean
Terminal window
# Sign in first. __Host-portal_session is a session cookie, so send it with every request.
curl -X POST 'https://depot.example.com/api/portal/v1/orgs/<clientID>/payment-methods/session' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-b '__Host-portal_session=<portal-session>' \
--data '"string"'

GET /api/portal/v1/orgs/{clientID}/payments

Section titled “GET /api/portal/v1/orgs/{clientID}/payments”

GETportal:invoices:readportal facemspIdempotent

Source: [object Object]

listPaymentHistory is the client’s payments, newest first: method, amount, status (a bank payment in flight is “processing”, never paid), the decline reason of a failure, and whether a receipt can be downloaded.

?status filters by row status; ?from and ?to bound the invoices’ issue dates.

NameInTypeRequiredDescription
clientIDpathstringYes
pagequerystringNo
pageSizequerystringNo
statusquerystringNo
StatusBodyDescription
200application/json, PagePortalPaymentRowSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
itemsrequiredarray of PortalPaymentRow
items[].amountCentsrequiredinteger

int64.

items[].autopayrequiredboolean
items[].currencyCoderequiredstring
items[].declineReasonrequiredstring
items[].idrequiredstring
items[].invoiceIdrequiredstring
items[].invoiceNumberrequiredstring
items[].methodrequiredstring, one of ach, card, check, other
items[].methodLabelrequiredstring
items[].occurredAtrequiredstring (date-time)
items[].onlinerequiredboolean
items[].receiptAvailablerequiredboolean
items[].referencerequiredstring
items[].statusrequiredstring, one of canceled, failed, paid, pending, processing, requires_action, returned, void
items[].surchargeCentsrequiredinteger

int64.

pagerequiredinteger
pageSizerequiredinteger
totalrequiredinteger
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/payments?page=<page>&pageSize=<pageSize>&status=<status>' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GET /api/portal/v1/orgs/{clientID}/payments/{paymentID}/receipt

Section titled “GET /api/portal/v1/orgs/{clientID}/payments/{paymentID}/receipt”

GETportal:invoices:readportal facemspIdempotentdownloadNot 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]

paymentReceipt is a PDF receipt for money received, named by the invoice number and the date.

NameInTypeRequiredDescription
clientIDpathstringYes
paymentIDpathstringYes
StatusBodyDescription
200application/octet-stream, string (binary)Success. The body shape was not resolved; see x-outpost-unresolved.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:invoices:read.
404application/problem+json, ProblemDetailsNo resource matches that id.
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/payments/<paymentID>/receipt' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

GETportal:estimate:readportal facemspIdempotent

Source: [object Object]

getUsage is the billable inventory now (the devices and people an agreement can count) and the daily counts between ?from and ?to (default the last 31 days, at most 400).

NameInTypeRequiredDescription
clientIDpathstringYes
StatusBodyDescription
200application/json, PortalUsageSuccess.
400NoneThe request was refused.
401application/problem+json, ProblemDetailsNo signed-in identity.
403application/problem+json, ProblemDetailsThe identity does not hold portal:estimate:read.
404application/problem+json, ProblemDetailsNo resource matches that id.

200 response body

FieldTypeDescription
countsTakenAtrequiredstring (date-time)
endpointsrequiredarray of PortalUsageEndpoint
endpoints[].classrequiredstring
endpoints[].idrequiredstring
endpoints[].namerequiredstring
endpoints[].osDisplayrequiredstring
endpoints[].osFamilyrequiredstring
endpoints[].serverrequiredboolean
fromrequiredstring
historyrequiredarray of PortalUsageDay
history[].carriedrequiredboolean
history[].daterequiredstring
history[].endpointCountrequiredinteger
history[].seatCountrequiredinteger
seatsrequiredarray of PortalUsageSeat
seats[].endpointIdsrequiredarray of string
seats[].idrequiredstring
seats[].namerequiredstring
torequiredstring
Terminal window
# Sign in first. __Host-portal_session 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/portal/v1/orgs/<clientID>/usage' \
-H 'X-Csrf-Token: <portal-csrf>' \
-H 'Accept: application/json' \
-b '__Host-portal_session=<portal-session>'

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.