Storefront invoices

Use these operations to access Storefront invoices.

Storefront operations interact directly with the customer, and provide the customer with access to their own data.

To use Storefront operations, the customer must be issued a JWT with limited permissions. For more information, see Create a session with username and password and Exchange an authentication token. Storefront operations are intended to be used directly from an untrusted browser.

Retrieve invoices

Request

Retrieve a list of invoices.

Security
CustomerJWT
Query
filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

limitinteger, [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offsetinteger, [ 0 .. 1000 ]

Specifies the starting point within the collection of items to be returned.

qstring

Use this field to perform a partial search of text fields.

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.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/storefront/invoices?filter=string&sort=string&limit=1000&offset=1000&q=string&expand=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Invoices retrieved.

Headers
Pagination-Totalinteger

Total number of items.

Example:332
Pagination-Limitinteger

Maximum number of items per page.

Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only

ID of the invoice.

Example:"in_0YVF9605RKC62BP14NE2R7V2XT"
websiteIdstring, <= 50 characters(WebsiteId)

ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.

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"
currencystring, = 3 characters(CurrencyCode)

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)
billingAddressobject(ContactObject)

Billing address of the invoice.

deliveryAddressobject(ContactObject)

Delivery address of the invoice.

poNumberstring or null

Purchase order number that is displayed on the invoice.

Example:"PO123456"
notesstring

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, (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""unpaid""paid""partially-paid""past-due""abandoned""voided""partially-refunded""refunded""disputed"
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, (date-time)(ServerTimestamp)read-only

Date and time when the invoice is abandoned.

voidedTimestring, (date-time)(ServerTimestamp)read-only

Date and time when the invoice is voided.

paidTimestring, (date-time)(ServerTimestamp)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, (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.

transactionsArray of objects(StorefrontTransaction)read-only

Invoice transactions array.

]
Response
[ { "id": "in_0YVF9605RKC62BP14NE2R7V2XT", "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "invoiceNumber": 0, "orderId": "ord_01HVKA5975PJBSQ1SX72G3MSZC", "subscriptionId": "sub_01HRF27SATGE4Z6PBJE6PD8328", "currency": "USD", "amount": 0.1, "amountDue": 0.1, "subtotalAmount": 0.1, "discountAmount": 0.1, "shipping": {}, "tax": {}, "billingAddress": {}, "deliveryAddress": {}, "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", "transactions": [], "_links": [] } ]