Retrieve an invoice

Request

Retrieves an invoice with a specified ID.
Security
SecretApiKey or JWT or ApplicationJWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required
ID of the resource.
Query
expandstring

Expands a request to include embedded objects within the _embedded property of the response. This field accepts a comma-separated list of objects.

For more information, see Embedded resources.

Headers
Acceptstring
Type of response media.
Default:"application/json"
Enum:"application/json""application/pdf"
curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/invoices/{id}?expand=string' \
  -H 'Accept: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

Invoice retrieved.
Body
idstring, <= 50 charactersread-only
ID of the invoice.
Example:"in_0YVF9605RKC62BP14NE2R7V2XT"
websiteIdstring, <= 50 characters(WebsiteId)required
Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
invoiceNumberintegerread-only
Auto-incrementing number based on the sequence of invoices for any particular customer.
orderIdstring or nullread-only

ID of the order (experimental).

Example:"ord_01HVKA5975PJBSQ1SX72G3MSZC"
subscriptionIdstring, <= 50 charactersread-only

ID of the related subscription order, if available. This field is null if there are no related subscription orders.

Example:"sub_01HRF27SATGE4Z6PBJE6PD8328"
quoteIdstring or null, <= 50 charactersread-only

ID of the related quote, if available. This field is null if there are no related quotes.

Example:"qt_01HXBZMEGPETPHJZH6V4RHBMA8"
currencystring, = 3 characters(CurrencyCode)required
Currency code in ISO 4217 format.
Example:"USD"
amountnumber, (double)read-only
Amount of the invoice.
amountDuenumber, (double)read-only
Amount that is due on the invoice.
subtotalAmountnumber, (double)read-only
Subtotal amount of the invoice.
discountAmountnumber, (double)read-only
Discount amount that is applied to the invoice.
shippingobject(Shipping)
taxobject(Taxes)
organizationTaxIdNumberobject or null
Organization tax ID number that is displayed on the invoice.
customerTaxIdNumberobject or null
Customer tax ID number that is displayed on the invoice.
billingAddressobject(ContactObject)
Billing address of the invoice. After the first payment is made for an invoice, this value cannot be changed.
deliveryAddressobject(ContactObject)
Delivery address of the invoice.
poNumberstring or null, <= 50 characters
Purchase order number that is displayed on the invoice.
Example:"PO123456"
notesstring, <= 65535 characters
Notes for the customer that are displayed on the invoice.
itemsArray of objects(InvoiceItem)read-only
Invoice items array.
discountsArray of objectsread-only
Discounts applied.
autopayScheduledTimestring or null, (date-time)

Date and time when an automatic payment (autopay) is scheduled.

autopayRetryNumberinteger, >= 0read-only

Number of times that an automatic payment (autopay) has been attempted on an invoice.

Default:0
statusstringread-only
Status of the invoice.
Enum:"draft""quotation""unpaid""paid""partially-paid""past-due""abandoned""voided""partially-refunded""refunded"
delinquentCollectionPeriodintegerread-only
Length of time, in days, between when the invoice is due and when the invoice is paid.
collectionPeriodintegerread-only
Length of time, in days, between when the invoice is issued and when the invoice is paid.
abandonedTimestring or null, (date-time)read-only
Date and time when the invoice is abandoned.
voidedTimestring or null, (date-time)read-only
Date and time when the invoice is voided.
paidTimestring or null, (date-time)read-only
Date and time when the invoice is paid.
dueTimestring, (date-time)
Date and time when the invoice is due for payment.
issuedTimestring, (date-time)(ServerTimestamp)read-only
Date and time when the invoice is issued.
createdTimestring, (date-time)(CreatedTime)read-only
Date and time when the resource is created. This value is set automatically when the resource is created.
updatedTimestring, (date-time)(UpdatedTime)read-only
Date and time when the resource is updated. This value is set automatically when the resource is updated.
paymentFormUrlstring or null, (uri)read-only

URL where the customer is redirected to pay the invoice using one of the methods which are available to the customer. This is an alternative to creating a new transaction with empty methods.

creditMemoAllocationsArray of objects(CreditMemoInvoiceAllocation)read-only
Credit memo allocations to an invoice.
isNewOrderbooleanread-only
Specifies if the order is a new order.
Example:true
customerIdstring, <= 50 characters(CustomerId)required
ID of the customer resource.
Example:"cus_0YV7DDSDD1C8DA64KHH2W33CPF"
transactionsArray of objects, <= 10 items(Transaction)read-only

Up to 10 of the most recent transactions for the invoice. To retrieve transactions for an invoice, use Retrieve transactions with the invoiceIds filter. Search results can lag briefly behind a write.

retryInstructionobject or null
Invoice payment retry instruction. This object specifies how to proceed if a payment related to the invoice fails.
revisionintegerread-only
Number of times the invoice data has been modified. Use the revision number when analyzing webhook data to determine if a change should take precedence over the current representation.
typestringread-only
Type of invoice.
Enum:"initial""renewal""interim""cancellation""one-time""refund""charge""one-time-sale"
dueReminderTimestring or null, (date-time)read-only
Date and time when a past due reminder event is triggered.
dueReminderNumberinteger or nullread-only
Number of past due reminder events that have been triggered.
organizationIdstring, <= 50 characters(OrganizationId)read-only

Unique organization identifier. An organization is an entity that represents a company. For more information, see Obtain an organization ID.

Example:"org_0YVDM8RC7GDADADSBSMW124JA8"
delinquencyTimestring or null, (date-time)

Date and time when the related order is considered delinquent, and is canceled. If this value is null, no delinquency time is configured. If the dueTime of the order becomes greater than the delinquencyTime value, the delinquencyTime value becomes equal to dueTime.

If an invoice is not related to an order, this field can only be null.

Default:null
_embeddedobjectread-only

Embedded objects that are requested by the expand query parameter.

Response
{ "id": "in_0YVF9605RKC62BP14NE2R7V2XT", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "invoiceNumber": 0, "orderId": "ord_01HVKA5975PJBSQ1SX72G3MSZC", "subscriptionId": "sub_01HRF27SATGE4Z6PBJE6PD8328", "quoteId": "qt_01HXBZMEGPETPHJZH6V4RHBMA8", "currency": "USD", "amount": 0.1, "amountDue": 0.1, "subtotalAmount": 0.1, "discountAmount": 0.1, "shipping": { "amount": 0.1, "calculator": "manual" }, "tax": { "calculator": "manual", "amount": 0.1, "items": [ … ] }, "organizationTaxIdNumber": { "type": "eu-vat", "value": "GB980780684" }, "customerTaxIdNumber": { "type": "eu-vat", "value": "GB980780684" }, "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "deliveryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "poNumber": "PO123456", "notes": "string", "items": [ { … } ], "discounts": [ { … } ], "autopayScheduledTime": "2019-08-24T14:15:22Z", "autopayRetryNumber": 0, "status": "draft", "delinquentCollectionPeriod": 0, "collectionPeriod": 0, "abandonedTime": "2019-08-24T14:15:22Z", "voidedTime": "2019-08-24T14:15:22Z", "paidTime": "2019-08-24T14:15:22Z", "dueTime": "2019-08-24T14:15:22Z", "issuedTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "paymentFormUrl": "http://example.com", "creditMemoAllocations": [ { … } ], "isNewOrder": true, "customerId": "cus_0YV7DDSDD1C8DA64KHH2W33CPF", "transactions": [ { … } ], "retryInstruction": { "attempts": [ … ], "afterAttemptPolicies": [ … ], "afterRetryEndPolicies": [ … ] }, "revision": 0, "type": "initial", "dueReminderTime": "2019-08-24T14:15:22Z", "dueReminderNumber": 0, "organizationId": "org_0YVDM8RC7GDADADSBSMW124JA8", "delinquencyTime": null, "_links": [ { … } ], "_embedded": { "customer": {}, "website": {}, "organization": {}, "leadSource": {}, "shippingRate": {} } }