Retrieve an upcoming order invoice

Request

Retrieves an upcoming invoice for a specified order.

An upcoming invoice is an invoice that has not been issued. It functions as a preview of the next invoice for the order. For more information, see Invoices.

Security
SecretApiKey or JWT
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.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/orders/{id}/upcoming-invoice?expand=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

Upcoming invoice retrieved.
Bodyapplication/json
idstring, <= 50 charactersread-only
ID of the upcoming invoice. This value is persisted in the future renewal invoice.
Example:"in_0YVF9605RKC62BP14NE2R7V2XT"
currencystring, = 3 characters(CurrencyCode)
Currency code in ISO 4217 format.
Example:"USD"
revisioninteger
Number of times the upcoming invoice data has changed. Use the revision number when analyzing webhook data to determine if a change should take precedence over the current representation.
itemsArray of objects(OrderUpcomingInvoiceItem)
Upcoming invoice items array.
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)
discountsArray of objectsread-only
Discounts applied.
issuedTimestring, (date-time)(ServerTimestamp)read-only
Date and time when the invoice is issued.
isNewOrderbooleanread-only
Specifies if the order is a new order.
Example:true
dueTimestring, (date-time)
Date and time when the invoice is due for payment.
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.
Response
{ "id": "in_0YVF9605RKC62BP14NE2R7V2XT", "currency": "USD", "revision": 0, "items": [ { … } ], "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": [ … ] }, "discounts": [ { … } ], "issuedTime": "2019-08-24T14:15:22Z", "isNewOrder": true, "dueTime": "2019-08-24T14:15:22Z", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ { … } ] }