Get a receipt
curl --request GET \
--url https://anythingmd.com/api/v1/receipts/{receiptId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://anythingmd.com/api/v1/receipts/{receiptId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://anythingmd.com/api/v1/receipts/{receiptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/receipts/{receiptId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"jobId": "<string>",
"quoteId": "<string>",
"artifactIds": [
"<string>"
],
"holdId": "<string>",
"tenantId": "<string>",
"actorPrincipalId": "<string>",
"actorType": "<string>",
"credentialId": "<string>",
"channel": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"sourceFormat": "<string>",
"reservedCredits": 4503599627370495,
"settledCredits": 4503599627370495,
"priceVersion": "<string>",
"tier": "<string>",
"fundingSource": "<string>",
"originalReceiptId": "<string>",
"kind": "original",
"outcome": "<string>",
"errorCode": "<string>",
"metronomeEventId": "<string>",
"stripeInvoiceId": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Receipts
Get a receipt
Returns a receipt by id (rcpt_<jobId>).
GET
/
api
/
v1
/
receipts
/
{receiptId}
Get a receipt
curl --request GET \
--url https://anythingmd.com/api/v1/receipts/{receiptId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://anythingmd.com/api/v1/receipts/{receiptId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://anythingmd.com/api/v1/receipts/{receiptId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/receipts/{receiptId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"jobId": "<string>",
"quoteId": "<string>",
"artifactIds": [
"<string>"
],
"holdId": "<string>",
"tenantId": "<string>",
"actorPrincipalId": "<string>",
"actorType": "<string>",
"credentialId": "<string>",
"channel": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"sourceFormat": "<string>",
"reservedCredits": 4503599627370495,
"settledCredits": 4503599627370495,
"priceVersion": "<string>",
"tier": "<string>",
"fundingSource": "<string>",
"originalReceiptId": "<string>",
"kind": "original",
"outcome": "<string>",
"errorCode": "<string>",
"metronomeEventId": "<string>",
"stripeInvoiceId": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Create a key under Settings → API Keys and send it as Authorization: Bearer amd_live_…. See https://docs.anythingmd.com/authentication.
Path Parameters
Id of a usage receipt
Minimum string length:
1Response
Usage receipt
Receipt id (stable: rcpt_)
Minimum string length:
1Id of an async job
Minimum string length:
1Quote id when one was pinned
Minimum string length:
1Artifact ids produced by the job
Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Minimum string length:
1Natural units; not a second bill
Show child attributes
Show child attributes
Credits reserved when the job started
Required range:
0 <= x <= 9007199254740991Credits actually captured; 0 when the hold was released
Required range:
0 <= x <= 9007199254740991Minimum string length:
1Pricing tier the job was charged at, e.g. standard
Minimum string length:
1Minimum string length:
1Set on refund/correction receipts; null on the original
Minimum string length:
1Available options:
original, refund, correction Minimum string length:
1Minimum string length:
1Minimum string length:
1Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$