List jobs
GET/subscriptions/jobs
Retrieves a list of all jobs.
Filtering
This endpoint supports filtering. For the general syntax, see Filtering.
The following attributes and operators are supported.
Operator | Attribute | Description |
---|---|---|
eq | external_ref | Equals. Checks if the values of two operands are equal. If they are, the condition is true. |
Request
Query Parameters
Possible values: <= 10000
The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the page length store setting is used.
The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the page length store setting is used.
Responses
- 200
- 500
Success. A list of jobs is returned.
- application/json
- Schema
- Example (from schema)
Schema
- Array [
billing_run
- a billing run job.payment_run
- a payment run job.tax_run
- a tax run job.- Array [
- Array [
- ]
- ]
- BillingRunReport
- TaxRunReport
- PaymentRunReport
- ]
data Job[]
The unique identifier.
Possible values: [subscription_job
]
attributes JobCreateAttributesrequired
Possible values: <= 2048 characters
A unique attribute that you could use to contain information from another company system, for example. The maximum length is 2048 characters.
Possible values: [billing-run
, tax-run
, payment-run
, import
]
The type of job. One of the following:
taxes InvoiceTaxItems[]
Possible values: >= 1
The unique identifier.
tax_items TaxItem[]required
Possible values: [tax_item
]
This represents the type of resource object being returned. Always tax_item
.
Possible values: <= 1024 characters
The name that appears on your customer's invoice and usually describes the specific type of tax, for example, Sales
, VAT
or GST
.
Possible values: <= 1024 characters
The unique identifier assigned to goods and services for taxation purposes.
The tax rate is the percentage of the subscription amount that is required to be paid as tax.
Possible values: <= 1024 characters
The geographic area or political entity that has authority to levy and collect taxes.
Possible values: [pending
, started
, success
, failed
]
The status of job.
The date and time a resource was updated.
The date and time a resource was created.
relationships Relationships
Relationships are established between different subscription entities. For example, a product and a plan are related to an offering, as both are attached to it.
meta JobMetarequired
The owner of a resource, either store
or organization
.
timestamps Timestampsrequired
The date and time a resource was updated.
The date and time a resource was created.
The date and time a job is started.
The date and time a job finished.
report object
You can track your Subscriptions billing, tax, and payment operations using reports.
The total number of invoices created that are ready for payment.
The total number of invoices created that need taxes to be applied before payment can be made.
The total number of invoices that were scheduled but creation failed.
total_ready_for_payment Pricerequired
The total amount ready for payment invoiced in the billing run, segmented by currency.
property name* object
The base price.
The value as a whole number of the currency's smallest subdivision.
Indicates whether the amount includes any taxes.
total_tax_required Pricerequired
The total amount (excluding tax) invoiced in the billing run but still requiring taxes, segmented by currency.
property name* object
The base price.
The value as a whole number of the currency's smallest subdivision.
Indicates whether the amount includes any taxes.
The total number of invoices to which tax was successfully added.
The total number of invoices to which tax could not be added.
The total number of invoices for which payment was attempted.
The number of failed payment attempts.
total_collected Pricerequired
The total amount collected by the payment run, segmented by currency.
property name* object
The base price.
The value as a whole number of the currency's smallest subdivision.
Indicates whether the amount includes any taxes.
links object
{
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"type": "subscription_job",
"attributes": {
"external_ref": "abc123",
"job_type": "billing-run",
"taxes": [
{
"invoice_id": "00000000-0000-0000-0000-000000000000",
"tax_items": [
{
"type": "tax_item",
"name": "GST",
"code": "20.0 % S",
"rate": 0.2,
"jurisdiction": "USA"
}
]
}
],
"status": "pending",
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z"
},
"relationships": {
"plans": {
"links": {
"related": "/offerings/:offering-id/plans",
"self": "/offerings/:offering-id"
},
"data": {
"type": "offering-plan",
"id": "625fe958-7b4b-40a0-a2c0-dbb8f31eec0d"
}
}
},
"meta": {
"owner": "store",
"timestamps": {
"updated_at": "2017-01-10T11:41:19.244842Z",
"created_at": "2017-01-10T11:41:19.244842Z",
"started_at": "2017-01-10T11:41:19.244842Z",
"finished_at": "2017-01-10T11:41:19.244842Z"
}
}
}
],
"links": {}
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Additional supporting meta data for the error.
{
"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"
}
]
}