bearerAuth Bearer Token (JWT) MasBilling
| Resource | Description |
|---|---|
| Consumptions | Rating API for retrieving subscriptions consumption info |
| Movements | Billing API for managing different types of billing movements (discounts, recurring charges...) |
| Adjustments | Billing API for managing billing adjustments |
| Refunds | Billing API for managing billing refunds |
| Invoices | Billing API for managing invoices |
| LocationTax | Billing API for fetching location taxes |
| BillingInfo | Commons API for fetching tenants billing info |
bearerAuth Bearer Token (JWT) MasBilling
| Resource | Description |
|---|---|
| Consumptions | Rating API for retrieving subscriptions consumption info |
| Movements | Billing API for managing different types of billing movements (discounts, recurring charges...) |
| Adjustments | Billing API for managing billing adjustments |
| Refunds | Billing API for managing billing refunds |
| Invoices | Billing API for managing invoices |
| LocationTax | Billing API for fetching location taxes |
| BillingInfo | Commons API for fetching tenants billing info |
type field to InvoiceResponseDTO and SalesInvoiceResponseDTO, exposing whether the invoice is ORDINARY or RECTIFICATION.type filter to GET /orgs/{orgId}/accounts/{accountId}/invoices. Available types are ORDINARY and RECTIFICATION.type filter to GET /orgs/{orgId}/accounts/{accountId}/invoices/sales. Available types are ORDINARY and RECTIFICATION.GET /orgs/{orgId}/accounts/{accountId}/invoices/{invoiceId}/movements. It will be removed in a future release once consumers migrate to the new endpoint.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/movements as the postpaid-specific replacement for GET /orgs/{orgId}/accounts/{accountId}/invoices/{invoiceId}/movements.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/prepaid_service/{ordinaryInvoiceId}/movements to retrieve the movements of a prepaid ordinary invoice.GET /orgs/{orgId}/accounts/{accountId}/invoices/{invoiceId}/public_link. It will be removed in a future release once consumers migrate to the new endpoint.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/public_link as the postpaid-specific replacement for GET /orgs/{orgId}/accounts/{accountId}/invoices/{invoiceId}/public_link.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/prepaid_service/{ordinaryInvoiceId}/public_link to retrieve a public link to download the prepaid ordinary invoice document.POST /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices to create a draft postpaid rectification invoice for a postpaid ordinary invoice. The response returns the id of the created postpaid rectification invoice.POST /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/issue to issue a draft postpaid rectification invoice.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId} to retrieve a postpaid rectification invoice, detailing its refunds and the reason why the invoice is rectified.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/movements to retrieve the movements of a postpaid rectification invoice.DELETE /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId} to delete a postpaid rectification invoice while it is still a draft.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/public_link to retrieve a public link to download the postpaid rectification invoice document.GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/sales/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/public_link to retrieve a public link to download the sales rectification invoice document.invoice_number field to InvoiceResponseDTO, SalesInvoiceResponseDTO, MovementResponseDTO, AccountAdjustmentResponseDTO and RefundResponseDTO, exposing the same value as invoice_id. The invoice_id field is now deprecated (kept for backwards compatibility) and will be removed in a future release; consumers should migrate to invoice_number. On InvoiceResponseDTO the invoice_number field is optional and is omitted for draft (pending) invoices, which have no invoice number yet.id (internal surrogate identifier) to InvoiceResponseDTO and SalesInvoiceResponseDTO.{invoiceId} path parameter of the invoice endpoints now accepts either the fiscal invoice_id (invoice sequence) or the internal id.GET /orgs/{orgId}/accounts/{accountId}/invoices/sales to list device sale invoices, optionally filtered by device_id.GET /orgs/{orgId}/accounts/{accountId}/invoices/sales/{invoiceId} to retrieve a single device sale invoice.invoiceSequence to invoiceId in GET /orgs/{orgId}/accounts/{accountId}/invoices/sales/{invoiceId}/public_link (parameter is now consistent with the invoice_id field returned in the response DTO).AmountRequestDTO instead of BillableAmountRequestDTO in: POST /orgs/{orgId}/subscription/{subscriptionId}/movement/{movementId}/refund-non-subscribable-productscategory filter to GET /orgs/{orgId}/accounts/{accountId}/invoices.category field to invoice responses.Show subscription general consumptions info (bonus and monetary balances).
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
OK Subscription balances details
{
"id": "123456789",
"msisdn": "666554433",
"tenant": "masmovil",
"billingType": 2,
"monetary": [
{
"id": "666554433-123456789-MONETARY_DEFAULT-2020-09-01T00:00:00+02:00",
"currentValue": -4.7,
"currentValueWithTaxes": -5.69,
"unit": "EUR",
"activationDatetime": "2020-08-31T22:00:00Z",
"expirationDatetime": "2021-09-30T21:59:59.999999999Z",
"counters": [
{
"type": "internationalVoice",
"value": -1.34234534
},
{
"type": "premium",
"value": 0
},
{
"type": "roamingVoice",
"value": -15.7
},
{
"type": "estimatedTotal",
"value": -27.04234534
},
{
"type": "estimatedRoamingVoice",
"value": -20.6
}
]
}
],
"bonuses": {
"data": [
{
"id": "666554433-123456789-BONUS_TEMPLATE-3072-76789123-2020-09-01T00:00:00+02:00",
"initialValue": 3221225472,
"currentValue": 3048467002,
"unit": "byte",
"activationDatetime": "2020-08-31T22:00:00Z",
"expirationDatetime": "2021-09-30T21:59:59.999999999Z",
"renovationsCount": 3,
"catalogBonusId": "4321",
"customerBonusId": "76789123",
"isShared": false
},
{
"id": "432156789-777554433-223456789-BONUS_TEMPLATE-4096-66789123-2020-09-01T00:00:00+02:00",
"initialValue": 4294967296,
"currentValue": 3948568002,
"unit": "byte",
"activationDatetime": "2020-08-31T22:00:00Z",
"expirationDatetime": "2021-09-30T21:59:59.999999999Z",
"renovationsCount": 3,
"catalogBonusId": "5321",
"customerBonusId": "66789123",
"isShared": true
}
],
"sms": [
{
"id": "666554433-123456789-BONUS_TEMPLATE-1000-56789123-2020-09-01T00:00:00+02:00",
"initialValue": 1000,
"currentValue": 982,
"unit": "sms",
"activationDatetime": "2020-08-31T22:00:00Z",
"expirationDatetime": "2021-09-30T21:59:59.999999999Z",
"renovationsCount": 3,
"catalogBonusId": "6321",
"customerBonusId": "56789123",
"isShared": false
}
],
"voice": [
{
"id": "666554433-123456789-BONUS_TEMPLATE-100-46789123-2020-09-01T00:00:00+02:00",
"initialValue": 6000,
"currentValue": 4781,
"unit": "second",
"activationDatetime": "2020-08-31T22:00:00Z",
"expirationDatetime": "2021-09-30T21:59:59.999999999Z",
"renovationsCount": 3,
"catalogBonusId": "7321",
"customerBonusId": "46789123",
"isShared": false
}
]
}
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | Subscription id | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
msisdn
*
| string | Subscription msisdn | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tenant
*
| string | Subscription organization | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
billingType
*
| integer (int64)
()
124 | Subscription type id (prepaid: 1, postpaid: 2, landline: 4) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
monetary
*
| object[] | List of subscription monetary balances | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
bonuses
*
| object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "getSubscription"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/consumptions' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Show subscription consumptions details (subscription cdrs details). Consumption details could be filtered by period and traffic type ("data", "sms", "voice").
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
QUERY PARAMETERS
Cdr type used as filter
From datetime used as filter
To datetime used as filter
OK Subscription cdrs details
{
"data": [
{
"id": "18ba3a8322cb67ad7df47fb28996144ec185479",
"originNumber": "610545315",
"destinationNumber": "",
"initialDate": "2021-12-18T00:00:00Z",
"usage": 58411055,
"unit": "byte",
"costWithoutTaxes": 0,
"taxPercentage": 21,
"ratingCaseCategory": "DATA_NATIONAL",
"debitCase": "bonus",
"debitCatalogId": "321",
"debitCustomerId": "24920761"
}
],
"sms": [
{
"id": "088f5b34429b17be13bdc5787adcaa1d54aec1a4",
"originNumber": "610545315",
"destinationNumber": "600124932",
"initialDate": "2022-01-04T15:50:49Z",
"usage": 1,
"unit": "sms",
"costWithoutTaxes": 0.08,
"taxPercentage": 21,
"ratingCaseCategory": "SMS_NATIONAL",
"debitCase": "rating_plan",
"debitCatalogId": "316",
"debitCustomerId": ""
}
],
"voice": [
{
"id": "f802dff30b5ebec9ea9d886c81cb553d5dbb330a",
"originNumber": "610545315",
"destinationNumber": "636648371",
"initialDate": "2021-12-17T11:24:45Z",
"usage": 13,
"unit": "second",
"costWithoutTaxes": 0.165289,
"taxPercentage": 21,
"ratingCaseCategory": "VOICE_NATIONAL",
"debitCase": "rating_plan",
"debitCatalogId": "316",
"debitCustomerId": ""
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | object[] | List of subscription data cdrs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
sms | object[] | List of subscription sms cdrs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
voice | object[] | List of subscription voice cdrs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "wrongPrepaidRequestedPeriod"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "getSubscription"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/consumptions/details?type=data&fromDate=2021-10-10T22%3A00%3A00Z&toDate=2021-10-20T22%3A00%3A00Z' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' In the context of a given subscription, retrieves a list of all related billing movements.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
QUERY PARAMETERS
From datetime used as filter
To datetime used as filter
Movement type used as filter
Operation type used as filter
OK List of all subscription billing movements
[
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44",
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "987654321",
"invoice_number": "987654321",
"external_invoice_id": "123456789",
"invoice_cycle_date": "2022-02-28T23:00:00Z",
"external_movement_unique_id": "987654321",
"billable": false,
"transaction_type_id": "100",
"operation_type": "DEBIT",
"description": "February invoice"
}
] | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
type
*
| string
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEECONSUMPTION | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this movement belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this movement belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
external_invoice_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
invoice_cycle_date
*
| string (date-time) | If the invoice_id field is empty, this field indicates the expected invoice cycle date of the movement. On the other hand, if the invoice_id field is already filled, this field indicates the current invoice cycle date of the movement. | ||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
operation_type
*
| string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "getMovements"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "getMovements"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement?fromDate=2021-10-10T22%3A00%3A00Z&toDate=2021-10-20T22%3A00%3A00Z&movementType=RECURRING_CHARGE&operationType=DEBIT' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new billing movement.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"billable": false,
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
*
| string
()
ADJUSTMENTONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "wrongMovementBody"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "createMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "createMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}' Retrieves a single billing movement.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
OK Retrieve a billing movement
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44",
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "987654321",
"invoice_number": "987654321",
"external_invoice_id": "123456789",
"invoice_cycle_date": "2022-02-28T23:00:00Z",
"external_movement_unique_id": "987654321",
"billable": false,
"transaction_type_id": "100",
"operation_type": "DEBIT",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
type
*
| string
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEECONSUMPTION | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this movement belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this movement belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
external_invoice_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
invoice_cycle_date
*
| string (date-time) | If the invoice_id field is empty, this field indicates the expected invoice cycle date of the movement. On the other hand, if the invoice_id field is already filled, this field indicates the current invoice cycle date of the movement. | ||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
operation_type
*
| string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "movementNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "getMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "getMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Update an existing billing movement. Movements can only be updated if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"billable": false,
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
*
| string
()
ADJUSTMENTONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "wrongMovementBody"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "movementNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "updateMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "updateMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X PUT 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}' Delete an existing billing movement. Movements can only be deleted if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "movementNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "deleteMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "deleteMovement"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X DELETE 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new billing movement (for non subscribable products).
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
*
| string
()
ADJUSTMENTONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "wrongMovementBody"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "createMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "createMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement-non-subscribable-products' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' Update an existing billing movement (for non subscribable products). Movements (for non subscribable products) can only be updated if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
type
*
| string
()
ADJUSTMENTONE_TIME_FEERECURRING_CHARGESUSPENSION_SERVICE_FEEUNRETURNED_EQUIPMENT_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_movement_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "wrongMovementBody"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "movementNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "updateMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "updateMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X PUT 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement-non-subscribable-products/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"type": "RECURRING_CHARGE",
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_movement_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' Delete an existing billing movement (for non subscribable products). Movements (for non subscribable products) can only be deleted if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "subscriptionNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "movementNonSubscribableProductsNotFound"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "deleteMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "deleteMovementNonSubscribableProducts"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X DELETE 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement-non-subscribable-products/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all account adjustments for a given account.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
OK Retrieve a list of all account adjustments
[
{
"id": "eca565cf-8c87-4be5-a189-0a320f5dd1cd",
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"operation_type": "DEBIT",
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"invoice_id": "987654321",
"invoice_number": "987654321",
"invoice_cycle_date": "2022-02-28T23:00:00Z",
"description": "February invoice"
}
] | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
adjustment_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
operation_type
*
| string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
external_adjustment_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this adjustment belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this adjustment belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
invoice_cycle_date
*
| string (date-time) | If the invoice_id field is empty, this field indicates the expected invoice cycle date of the movement. On the other hand, if the invoice_id field is already filled, this field indicates the current invoice cycle date of the movement. | ||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/account/123456789/adjustment' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new account adjustment.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736,
"value_with_taxes": 13.02625181
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adjustment_datetime
*
| string (date-time) | ||||||||||||||||||
period_start_datetime | string (date-time) | ||||||||||||||||||
period_end_datetime | string (date-time) | ||||||||||||||||||
amount
*
| any | any | Amount of an adjustment. Exactly one of value_without_taxes or value_with_taxes must be provided, but not both. The value must be greater than 0. | |||||||||||||||||
One of: Option 1 any Option 2 any | |||||||||||||||||||
external_adjustment_unique_id
*
| string | ||||||||||||||||||
transaction_type_id
*
| string | ||||||||||||||||||
description
*
| string | ||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/account/123456789/adjustment' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736,
"value_with_taxes": 13.02625181
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' Retrieve a single account adjustment.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given billing adjustment
OK Retrieve a single account adjustment
{
"id": "eca565cf-8c87-4be5-a189-0a320f5dd1cd",
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"operation_type": "DEBIT",
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"invoice_id": "987654321",
"invoice_number": "987654321",
"invoice_cycle_date": "2022-02-28T23:00:00Z",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
adjustment_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
operation_type
*
| string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
external_adjustment_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this adjustment belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this adjustment belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
invoice_cycle_date
*
| string (date-time) | If the invoice_id field is empty, this field indicates the expected invoice cycle date of the movement. On the other hand, if the invoice_id field is already filled, this field indicates the current invoice cycle date of the movement. | ||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/account/123456789/adjustment/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Update an existing account adjustment.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given billing adjustment
{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736,
"value_with_taxes": 13.02625181
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adjustment_datetime
*
| string (date-time) | ||||||||||||||||||
period_start_datetime | string (date-time) | ||||||||||||||||||
period_end_datetime | string (date-time) | ||||||||||||||||||
amount
*
| any | any | Amount of an adjustment. Exactly one of value_without_taxes or value_with_taxes must be provided, but not both. The value must be greater than 0. | |||||||||||||||||
One of: Option 1 any Option 2 any | |||||||||||||||||||
external_adjustment_unique_id
*
| string | ||||||||||||||||||
transaction_type_id
*
| string | ||||||||||||||||||
description
*
| string | ||||||||||||||||||
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X PUT 'https://billing.masstack.com/v1/orgs/masmovil/account/123456789/adjustment/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736,
"value_with_taxes": 13.02625181
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' Delete an existing account adjustment.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given billing adjustment
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X DELETE 'https://billing.masstack.com/v1/orgs/masmovil/account/123456789/adjustment/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new billing movement of type adjustment.
Validation Requirements:
adjustment_datetime: Must be set and the subscription must be active at this date/time.external_adjustment_unique_id: Must be unique within the subscription. Cannot duplicate an existing adjustment's external ID.transaction_type_id: Must exist in the catalogue and be valid for this subscription's commercial product.description: Required and cannot be empty.amount: Either value_without_taxes OR value_with_taxes must be provided (not both), and the value must be greater than 0.period_start_datetime and period_end_datetime: Both must be provided together, or neither. If both are provided, adjustment_datetime must fall within this period (inclusive).PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adjustment_datetime
*
| string (date-time) | Date and time when the adjustment occurs. The subscription must be active at this date/time. Cannot be empty. | |||||||||||||||||
period_start_datetime | string (date-time) | Start of the billing period this adjustment applies to. If provided, period_end_datetime must also be provided. The adjustment_datetime must fall within the period (inclusive). | |||||||||||||||||
period_end_datetime | string (date-time) | End of the billing period this adjustment applies to. If provided, period_start_datetime must also be provided. The adjustment_datetime must fall within the period (inclusive). | |||||||||||||||||
amount
*
| any | any | Amount of an adjustment. Exactly one of value_without_taxes or value_with_taxes must be provided, but not both. The value must be greater than 0. | |||||||||||||||||
One of: Option 1 any Option 2 any | |||||||||||||||||||
external_adjustment_unique_id
*
| string | Unique identifier for this adjustment from the external system. Must be unique within the subscription. Cannot be empty. | |||||||||||||||||
transaction_type_id
*
| string | ID of the transaction type from the catalogue. Must be valid for the subscription's commercial product. Cannot be empty. | |||||||||||||||||
description
*
| string | Human-readable description of the adjustment. Cannot be empty. | |||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/adjustment' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' Update an existing billing movement of type adjustment. Adjustments can only be updated if they have not been invoiced, that is, if their invoice_id field is empty.
Validation Requirements:
adjustment_datetime: Must be set and the subscription must be active at this date/time.external_adjustment_unique_id: Must be unique within the subscription. Cannot duplicate another adjustment's external ID (can match the same adjustment being updated).transaction_type_id: Must exist in the catalogue and be valid for this subscription's commercial product.description: Required and cannot be empty.amount: Either value_without_taxes OR value_with_taxes must be provided (not both), and the value must be greater than 0.period_start_datetime and period_end_datetime: Both must be provided together, or neither. If both are provided, adjustment_datetime must fall within this period (inclusive).PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing adjustment
{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adjustment_datetime
*
| string (date-time) | Date and time when the adjustment occurs. The subscription must be active at this date/time. Cannot be empty. | |||||||||||||||||
period_start_datetime | string (date-time) | Start of the billing period this adjustment applies to. If provided, period_end_datetime must also be provided. The adjustment_datetime must fall within the period (inclusive). | |||||||||||||||||
period_end_datetime | string (date-time) | End of the billing period this adjustment applies to. If provided, period_start_datetime must also be provided. The adjustment_datetime must fall within the period (inclusive). | |||||||||||||||||
amount
*
| any | any | Amount of an adjustment. Exactly one of value_without_taxes or value_with_taxes must be provided, but not both. The value must be greater than 0. | |||||||||||||||||
One of: Option 1 any Option 2 any | |||||||||||||||||||
external_adjustment_unique_id
*
| string | Unique identifier for this adjustment from the external system. Must be unique within the subscription. Cannot be empty. | |||||||||||||||||
transaction_type_id
*
| string | ID of the transaction type from the catalogue. Must be valid for the subscription's commercial product. Cannot be empty. | |||||||||||||||||
description
*
| string | Human-readable description of the adjustment. Cannot be empty. | |||||||||||||||||
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X PUT 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/adjustment/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"adjustment_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_without_taxes": 10.76549736
},
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' In the context of a given subscription, retrieves a list of all related billing refunds.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
QUERY PARAMETERS
From datetime used as filter
To datetime used as filter
OK List of all subscription billing refunds
[
{
"id": "36d64f0a-71c8-466b-be65-2b0e5adeead5",
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "987654321",
"invoice_number": "987654321",
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}
] | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this refund belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this refund belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
external_invoice_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/refund?fromDate=2021-10-10T22%3A00%3A00Z&toDate=2021-10-20T22%3A00%3A00Z' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' In the context of a given billing movement, retrieves a list of all related billing refunds.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
OK List of all movement billing refunds
[
{
"id": "36d64f0a-71c8-466b-be65-2b0e5adeead5",
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "987654321",
"invoice_number": "987654321",
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}
] | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this refund belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this refund belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
external_invoice_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new billing refund. Refunds can only be created if their related billing movement has been invoiced, that is, if their related billing movement invoice_id field is not empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}' Retrieves a single billing refund.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
Executes the request in the context of the given billing refund
OK Retrieve a billing refund
{
"id": "36d64f0a-71c8-466b-be65-2b0e5adeead5",
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "987654321",
"invoice_number": "987654321",
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Identifier of the invoice this refund belongs to. Kept for backwards compatibility; use invoice_number instead. | ||||||||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Identifier of the invoice this refund belongs to. Same value as the deprecated invoice_id field. | ||||||||||||||||||||||||||||||||||||||||||
external_invoice_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund/36d64f0a-71c8-466b-be65-2b0e5adeead5' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Update an existing billing refund. Refunds can only be updated if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
Executes the request in the context of the given billing refund
{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
billable
*
| boolean | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X PUT 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund/36d64f0a-71c8-466b-be65-2b0e5adeead5' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"billable": false,
"description": "February invoice"
}' Delete an existing billing refund. Refunds can only be deleted if they have not been invoiced, that is, if their invoice_id field is empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
Executes the request in the context of the given billing refund
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X DELETE 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund/36d64f0a-71c8-466b-be65-2b0e5adeead5' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Create a new billing refund (for non subscribable products). Refunds (for non subscribable products) can only be created if their related billing movement has been invoiced, that is, if their related billing movement invoice_id field is not empty.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given subscription
Executes the request in the context of the given billing movement
{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refund_datetime
*
| string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount
*
| object | Numeric value with a maximum precision of 8 decimal places. | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
external_invoice_id | string | |||||||||||||||||||||||||||||||||||||||||||
external_refund_unique_id | string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id
*
| string | |||||||||||||||||||||||||||||||||||||||||||
description
*
| string | |||||||||||||||||||||||||||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/subscription/123456789/movement/eca565cf-8c87-4be5-a189-0a320f5dd1cd/refund-non-subscribable-products' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"refund_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59.999999999Z",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"external_invoice_id": "123456789",
"external_refund_unique_id": "987654321",
"transaction_type_id": "5432167890",
"description": "February invoice"
}' In the context of a given account, retrieves a list of all related invoices. Results can be filtered by invoice category and invoice type.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
QUERY PARAMETERS
From datetime used as filter
To datetime used as filter
Invoice category used as filter. Available categories are POSTPAID_SERVICE, PREPAID_SERVICE, and SALES.
Invoice type used as filter. Available types are ORDINARY and RECTIFICATION.
OK List of all account invoices
{
"invoices": [
{
"id": "eca565cf-8c87-4be5-a189-0a320f5dd1cd",
"invoice_id": "OS220000000001",
"invoice_number": "OS220000000001",
"issue_date": "2022-02-24T13:45:10Z",
"due_date": "2022-02-24T13:45:10Z",
"location_tax_type": "IVA",
"invoice_amounts": {
"tax_base": 10.45,
"non_tax_base": 5.15,
"tax_amount": 2.64,
"total_amount_in_invoice": 18.24,
"total_amount_out_of_invoice": 4.57,
"total_amount": 22.81
},
"type": "ORDINARY",
"category": "POSTPAID_SERVICE"
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
invoices
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices?fromDate=2021-10-10T22%3A00%3A00Z&toDate=2021-10-20T22%3A00%3A00Z&category=POSTPAID_SERVICE&type=ORDINARY' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieves the list of all sales invoices of an account, including rectification invoices. If the device_id query parameter is provided, only the invoices of that device are returned (both the original sale invoice and its rectification invoice when present). Results can also be filtered by invoice type.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
QUERY PARAMETERS
Filters the result by the given device id
Invoice type used as filter. Available types are ORDINARY and RECTIFICATION.
OK List of all account sales invoices
{
"invoices": [
{
"id": "eca565cf-8c87-4be5-a189-0a320f5dd1cd",
"invoice_id": "OS220000000001",
"invoice_number": "OS220000000001",
"issue_date": "2022-02-24T13:45:10Z",
"due_date": "2022-02-24T13:45:10Z",
"location_tax_type": "IVA",
"invoice_amounts": {
"tax_base": 10.45,
"non_tax_base": 5.15,
"tax_amount": 2.64,
"total_amount_in_invoice": 18.24,
"total_amount_out_of_invoice": 4.57,
"total_amount": 22.81
},
"type": "ORDINARY",
"device_id": "01HXYZ...",
"invoice_sequence_reference": "OS220000000001"
}
]
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
invoices
*
| object[] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices/sales?device_id=01HXYZ...&type=ORDINARY' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieves the information of a single sales invoice identified by the invoice id.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given invoice. Accepts either the fiscal invoice_id (invoice sequence) or the internal surrogate id of the invoice.
OK Get sales invoice details
{
"id": "eca565cf-8c87-4be5-a189-0a320f5dd1cd",
"invoice_id": "OS220000000001",
"invoice_number": "OS220000000001",
"issue_date": "2022-02-24T13:45:10Z",
"due_date": "2022-02-24T13:45:10Z",
"location_tax_type": "IVA",
"invoice_amounts": {
"tax_base": 10.45,
"non_tax_base": 5.15,
"tax_amount": 2.64,
"total_amount_in_invoice": 18.24,
"total_amount_out_of_invoice": 4.57,
"total_amount": 22.81
},
"type": "ORDINARY",
"device_id": "01HXYZ...",
"invoice_sequence_reference": "OS220000000001"
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id
*
| string | Internal surrogate identifier of the invoice | |||||||||||||||||||||||||||||||||||||
invoice_id
*
| string | Deprecated alias of invoice_number. Fiscal invoice number (invoice sequence). Kept for backwards compatibility; use invoice_number instead. | |||||||||||||||||||||||||||||||||||||
invoice_number
*
| string | Fiscal invoice number (invoice sequence). Same value as the deprecated invoice_id field. | |||||||||||||||||||||||||||||||||||||
issue_date
*
| string (date-time) | Emission date of invoice in RFC3339 format | |||||||||||||||||||||||||||||||||||||
due_date
*
| string (date-time) | Date of charge in RFC3339 format | |||||||||||||||||||||||||||||||||||||
location_tax_type
*
| string
()
IVAIGICIPSI_CEUTAIPSI_MELILLA | ||||||||||||||||||||||||||||||||||||||
invoice_amounts
*
| object | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
type
*
| string
()
ORDINARYRECTIFICATION | ||||||||||||||||||||||||||||||||||||||
device_id
*
| string | Identifier of the device the invoice belongs to | |||||||||||||||||||||||||||||||||||||
invoice_sequence_reference | string | Reference to the original invoice sequence; only present on rectification invoices | |||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices/sales/MC240000000000' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all movements related to a specific invoice in an account.
Deprecated: use GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/movements instead. This endpoint will be removed in a future release.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given invoice. Accepts either the fiscal invoice_id (invoice sequence) or the internal surrogate id of the invoice.
OK Retrieve a list of all movements related to an invoice
{
"account_movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
],
"subscription_movements": [
{
"subscription_id": "123456789",
"movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": null,
"value_without_taxes": null,
"tax": null
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices/MC240000000000/movements' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all movements related to a specific postpaid ordinary invoice in an account.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
OK Retrieve a list of all movements related to a postpaid ordinary invoice
{
"account_movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
],
"subscription_movements": [
{
"subscription_id": "123456789",
"movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": null,
"value_without_taxes": null,
"tax": null
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/movements' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all movements related to a specific prepaid ordinary invoice in an account.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
OK Retrieve a list of all movements related to a prepaid ordinary invoice
{
"account_movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
],
"subscription_movements": [
{
"subscription_id": "123456789",
"movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": null,
"value_without_taxes": null,
"tax": null
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/prepaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/movements' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the invoice of a given account. The public link allows to download the invoice document.
Deprecated: use GET /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/public_link instead. This endpoint will be removed in a future release.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given invoice. Accepts either the fiscal invoice_id (invoice sequence) or the internal surrogate id of the invoice.
OK Retrieve an account invoice
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices/MC240000000000/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the postpaid ordinary invoice of a given account. The public link allows to download the invoice document.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
OK Retrieve a postpaid ordinary invoice public link
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the prepaid ordinary invoice of a given account. The public link allows to download the invoice document.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
OK Retrieve a prepaid ordinary invoice public link
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/prepaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the sales invoice of a given account. The public link allows to download the invoice document.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given invoice. Accepts either the fiscal invoice_id (invoice sequence) or the internal surrogate id of the invoice.
OK Retrieve a sales invoice public link
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/invoices/sales/MC240000000000/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Creates a postpaid rectification invoice for the given postpaid ordinary invoice of an account. The postpaid rectification invoice is created as a draft and must be issued afterwards through POST /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/issue. The returned id identifies the created postpaid rectification invoice and is the {rectificationInvoiceId} expected by the rest of the rectification endpoints.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
{
"refunds": [
{
"amount": {
"value_with_taxes": 12.1
},
"invoice_name": "Refund invoice name",
"related_movement_id": "af067908-67a4-4598-8662-6903cc2afab5"
}
],
"reason": {
"description": "Importe facturado incorrecto",
"ticket": "OPIT-1345"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refunds
*
| object[] | ||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||
reason
*
| object | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
Created Resource created
{
"id": "8da2b117-ef72-413d-98ce-36d1eb544e44"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
id | string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices' \
-H 'Authorization: Bearer {access-token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"refunds": [
{
"amount": {
"value_with_taxes": 12.1
},
"invoice_name": "Refund invoice name",
"related_movement_id": "af067908-67a4-4598-8662-6903cc2afab5"
}
],
"reason": {
"description": "Importe facturado incorrecto",
"ticket": "OPIT-1345"
}
}' Retrieves the postpaid rectification invoice of the given postpaid ordinary invoice of an account, detailing the refunds that make it up and the reason why the invoice is rectified.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
OK The postpaid rectification invoice
{
"refunds": [
{
"amount": {
"value_with_taxes": 12.1
},
"invoice_name": "Refund invoice name",
"related_movement_id": "af067908-67a4-4598-8662-6903cc2afab5"
}
],
"reason": {
"description": "Importe facturado incorrecto",
"ticket": "OPIT-1345"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refunds
*
| object[] | ||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||
reason
*
| object | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Deletes an existing postpaid rectification invoice. Postpaid rectification invoices can only be deleted while they are still a draft, that is, before they are issued through POST /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices/{rectificationInvoiceId}/issue.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
No Content Ok with empty body
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X DELETE 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Issues the given draft postpaid rectification invoice, previously created through POST /orgs/{orgId}/accounts/{accountId}/ordinary_invoices/postpaid_service/{ordinaryInvoiceId}/rectification_invoices. Once issued, the postpaid rectification invoice gets its fiscal invoice number and can no longer be modified.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
OK The issued postpaid rectification invoice
{
"refunds": [
{
"amount": {
"value_with_taxes": 12.1
},
"invoice_name": "Refund invoice name",
"related_movement_id": "af067908-67a4-4598-8662-6903cc2afab5"
}
],
"reason": {
"description": "Importe facturado incorrecto",
"ticket": "OPIT-1345"
}
} | Property | Type | Description | Constraints | Default | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
refunds
*
| object[] | ||||||||||||||||||||||||||||||||||||||
Array items:
| |||||||||||||||||||||||||||||||||||||||
reason
*
| object | ||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X POST 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd/issue' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all movements related to a specific postpaid rectification invoice in an account.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
OK Retrieve a list of all movements related to a postpaid rectification invoice
{
"account_movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": 13.02625181,
"value_without_taxes": 10.76549736,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
],
"subscription_movements": [
{
"subscription_id": "123456789",
"movements": [
{
"id": "uuid-1234-5678-90ab-cdef12345678",
"account_id": "123456789",
"amount": {
"value_with_taxes": null,
"value_without_taxes": null,
"tax": null
},
"movement_datetime": "2022-02-24T13:45:10Z",
"period_start_datetime": "2022-01-31T23:00:00Z",
"period_end_datetime": "2022-02-28T22:59:59Z",
"transaction_type_id": "5432167890",
"description": "February invoice"
}
]
}
]
} | Property | Type | Description | Constraints | Default | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
account_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
subscription_movements
*
| object[] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Array items:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd/movements' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the postpaid rectification invoice of a given postpaid ordinary invoice of an account. The public link allows to download the invoice document.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
OK Retrieve a postpaid rectification invoice public link
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/postpaid_service/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get a public link to the sales rectification invoice of a given sales ordinary invoice of an account. The public link allows to download the invoice document.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
Executes the request in the context of the given postpaid ordinary invoice
Executes the request in the context of the given postpaid rectification invoice
OK Retrieve a sales rectification invoice public link
{
"public_link": "https://storage.googleapis.com/mas-documents-prod/cbd2e693-d71a-4cee-8313-1972acc0394d"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
public_link
*
| string |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/ordinary_invoices/sales/eca565cf-8c87-4be5-a189-0a320f5dd1cd/rectification_invoices/eca565cf-8c87-4be5-a189-0a320f5dd1cd/public_link' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' In the context of a given account, retrieves the next billing date.
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given account
OK Account next billing date
{
"next_billing_date": "2022-02-24T13:45:10Z",
"billing_status": "ACTIVATED"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
next_billing_date | string (date-time) | Next billing date in RFC3339 format | ||
billing_status
*
| string
()
ACTIVATEDDEACTIVATED | Billing status of the account. |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Bad Gateway A third party connection is not responding
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/accounts/123456789/billing_details' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Get the location tax of a given state id. The location tax is the percentage and tax type that applies to a given state. State ids are defined by INE
PATH PARAMETERS
Executes the request in the context of the given organization
Executes the request in the context of the given location (state id)
OK Location tax information
{
"type": "IVA",
"percentage": 21
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
type
*
| string
()
IVAIGICIPSI_CEUTAIPSI_MELILLA | |||
percentage
*
| number (double) | min: 0 |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Unauthorized The user is not authorized
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Forbidden The user does not have permission to access that resource
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Gateway Timeout The request timed out
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil/location-taxes/28' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' This endpoint retrieves the billing info associated to a tenant by its tenant name
PATH PARAMETERS
Executes the request in the context of the given organization
OK Billing info
{
"language": "es",
"invoice_cycle_start_day": 22
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
language
*
| string | Default language for the tenant. This follows IETF language tag, which combine sub-tags from other standards such as ISO 639, ISO 15924, ISO 3166-1 and UN M.49 | ||
invoice_cycle_start_day
*
| integer | Day of the month in which the invoice cycle starts |
Bad Request The request could not be processed because it was malformed
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Not Found The specified resource was not found
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
Internal Server Error The request failed to be processed by the server
{
"error": "string",
"message": "string",
"trace_id": "string"
} | Property | Type | Description | Constraints | Default |
|---|---|---|---|---|
error | string | |||
message | string | |||
trace_id | string |
curl -X GET 'https://billing.masstack.com/v1/orgs/masmovil' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json'