Get invoice
GEThttps://euwest.api.elasticpath.com/v2/subscriptions/invoices/:invoice_uuid
Get invoice
Request
Path Parameters
invoice_uuid UUIDrequired
The unique identifier of the invoice.
Responses
- 200
- 400
- 404
- 500
Success. The details of the invoice are returned.
- application/json
- Schema
- Example (auto)
Schema
data SubscriptionInvoice
{
"data": {
"id": "11111111-2222-3333-4444-555555555555",
"type": "subscription_invoice",
"attributes": {
"billing_period": {
"start": "2017-07-21T17:32:28Z",
"end": "2017-07-21T17:32:28Z"
},
"invoice_items": [
{
"description": "Magazine issue",
"price": {
"currency": "USD",
"amount": 100,
"includes_tax": false
},
"product_id": "11111111-2222-3333-4444-555555555555",
"from_time_period": "2017-01-10T11:41:19.244842Z",
"until_time_period": "2017-01-10T11:41:19.244842Z"
}
],
"tax_items": [
{
"type": "tax_item",
"name": "GST",
"code": "20.0 % S",
"rate": 0.2,
"jurisdiction": "USA"
}
],
"outstanding": true,
"number": 1,
"tax_required": true,
"payment_retries_limit_reached": false,
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"manual_payment_pending": true
},
"meta": {
"owner": "store",
"subscription_id": "11111111-2222-3333-4444-555555555555",
"subscriber_id": "11111111-2222-3333-4444-555555555555",
"price": {
"currency": "USD",
"amount": 100,
"includes_tax": false
},
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"taxes_added_at": "2017-01-10T11:41:19.244842Z"
},
"proration_events": [
{
"proration_policy_id": "11111111-2222-3333-4444-555555555555",
"billing_cost_before_proration": 100,
"refunded_amount_for_unused_plan": 100,
"new_plan_cost": 100,
"prorated_at": "2017-01-10T11:41:19.244842Z"
}
]
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (auto)
- missing-name
Schema
errors Error[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (auto)
- not-found
Schema
errors Error[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "No plan found"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (auto)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}
Authorization: http
name: BearerTokentype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://euwest.api.elasticpath.com/v2/subscriptions/invoices/:invoice_uuid");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear