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 |
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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "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_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount* | object | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "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_FEE | |||||||||||||||||||||||||||||||||||||||||||
movement_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_start_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
period_end_datetime* | string (date-time) | |||||||||||||||||||||||||||||||||||||||||||
amount* | object | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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 |
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": 12.1,
"value_without_taxes": 10,
"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
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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": 12.1,
"value_without_taxes": 10,
"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
()
ADJUSTMENTDISCOUNTINSTALLATION_FEEONE_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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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 |
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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"operation_type": "DEBIT",
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"invoice_id": "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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
operation_type* | string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
external_adjustment_unique_id* | string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||||||
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 |
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,
"value_with_taxes": 12.1
},
"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. | |||||||||||||||||
| |||||||||||||||||||
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 |
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,
"value_with_taxes": 12.1
},
"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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"operation_type": "DEBIT",
"external_adjustment_unique_id": "987654321",
"transaction_type_id": "5432167890",
"invoice_id": "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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
operation_type* | string
()
CREDITDEBIT | |||||||||||||||||||||||||||||||||||||||||||
external_adjustment_unique_id* | string | |||||||||||||||||||||||||||||||||||||||||||
transaction_type_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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. | ||||||||||||||||||||||||||||||||||||||||||
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 |
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,
"value_with_taxes": 12.1
},
"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. | |||||||||||||||||
| |||||||||||||||||||
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 |
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,
"value_with_taxes": 12.1
},
"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 |
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
},
"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. | |||||||||||||||||
| |||||||||||||||||||
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 |
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
},
"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
},
"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. | |||||||||||||||||
| |||||||||||||||||||
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 |
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
},
"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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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": 12.1,
"value_without_taxes": 10,
"tax": {
"type": "IVA",
"percentage": 21
}
},
"invoice_id": "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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
invoice_id* | string | |||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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 | |||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
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 |
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": 12.1,
"value_without_taxes": 10,
"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 |
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_without_taxes": 10
},
"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 | |||||||||||||
| ||||||||||||||
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 |
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_without_taxes": 10
},
"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.
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
OK List of all account invoices
{
"invoices": [
{
"invoice_id": "OS220000000001",
"issue_date": "2022-02-24T13:45:10Z",
"due_date": "2022-02-24T13:45:10Z",
"location_tax_type": "IVA",
"invoice_amounts": {
"tax_base": 10,
"non_tax_base": 5,
"tax_amount": 2.1,
"total_amount_in_invoice": 17.1,
"total_amount_out_of_invoice": 4.5,
"total_amount": 21.6
}
}
]
} | 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 |
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' \
-H 'Authorization: Bearer {access-token}' \
-H 'Accept: application/json' Retrieve a list of all movements related to a specific 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 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": 12.1,
"value_without_taxes": 10,
"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 |
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' Get a public link to the 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
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 |
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' 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 |
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 (float) | 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 |
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'