Download OpenAPI specification:Download
This guide describes list of API services that are provided by OT Rainbow Invoicing portal. This portal is dedicated to end user features.
REST interface is used for sending/receiving OT rainbow API messages. HTTP requests GET, DELETE, POST, UPDATE are used. Standard HTTP responses are used to provide requested information or error status. There is no session notion in OT Rainbow system, so requests could be issued according stateless model, without transport conservation between them. Additional data could be provided in message body. JSON is used as a main format for data encoding in message body part. Each request is started with the following pattern /{module}/{version}/ where {module} is a portal module name to address and {version} is a version of used API, par example, “v1.0”.
Each request should contain some credential information to authenticate itself. Standard HTTP authentication with basic/bearer modes is used. JSON Web Token mechanism is used to provide authentication information. JWT has a expire timeout that is controlled by OT Rainbow portal to prevent very long token usage. Also authentication with application token is used. The token must be provided in the request HTTP header, using a custom header: APIKey. At server side, token is verified, and if it doesn’t match, 403 Not Allowed response is sent. TLS is used as a transport protocol to support message exchanges between OT Rainbow portal and an application.
For accessing the API a valid JWT token or a valid OAuth access token must be passed in all the queries in the 'Authorization' header.
Security Scheme Type | API Key |
---|---|
Header parameter name: | Authorization |
This API allows superadmin
, bp_finance
and admin
to download a given invoice.
To download an invoice, admin should use filepath provided by GET /api/rainbow/invoicing/v1.0/invoices API.
Example of request to download an invoice : GET /api/rainbow/invoicing/v1.0/invoices/000000001111110001000010/2017-10/services/CDR_SERV_2017-10-10_DR_dr_bp_test.csv
invoicePath required | string path of the file to download (e.g. 000000001111110001000010/2017-10/services/CDR_SERV_2017-10-10_DR_dr_bp_test.csv) |
{- "Content-Type": "text/csv",
- "Content-disposition": "string",
- "csv": [
- {
- "aleServiceReference": "string",
- "bp1TApplicantName": "string",
- "bp1TApplicantNumber": "string",
- "bp1TCRDId": "string",
- "bp1TDiscountValue": 0,
- "bp1TNetTotalValue": 0,
- "bp1TNetUnitValue": 0,
- "bp2TApplicantName": "string",
- "bp2TApplicantNumber1": "string",
- "bp2TApplicantNumber2": "string",
- "bp2TCRDId": "string",
- "bp2TDiscountValue": 0,
- "bp2TNetTotalValue": 0,
- "bp2TNetUnitValue": 0,
- "categoryCode": "string",
- "currency": "USD",
- "empty1": "string",
- "empty2": "string",
- "empty3": "string",
- "empty4": "string",
- "endCustomerCompanyId": "string",
- "endCustomerCompanyId1ByBp": "string",
- "endCustomerCompanyName": "string",
- "endCustomerDiscountValue": 0,
- "endCustomerNetTotalValue": 0,
- "endCustomerNetUnitValue": 0,
- "exportReference": "string",
- "invoiceCreationDate": "string",
- "invoiceLine": 0,
- "invoicePeriod": "string",
- "invoiceReference": "string",
- "rainbowServiceDescription": "string",
- "rainbowServiceId": "string",
- "subscriptionReference": "string",
- "unit": "User",
- "volume": 0,
- "wplPricePerUnit": 0,
- "wplPriceTotal": 0
}
]
}
This API allows superadmin
, bp_finance
and admin
to list all available invoices.
companyId | string companyId for which invoices should be listed |
billingPeriod | string Period for which invoice should be listed (e.g. 2017-08) |
invoiceType | string Enum: "services" "conference" "voice" Type of invoice that should be listed (services or conference) |
fileType | string Enum: "INV" "CDR" Type of file that should be listed (INV or CDR) |
invoiceCreationDate | string <date> Allow to filter invoices on |
fromInvoiceCreationDate | string <date> Allow to filter invoices on |
toInvoiceCreationDate | string <date> Allow to filter invoices on |
bpType | string Enum: "VAD" "DR" "IR" bpType for which invoices should be listed.
Only usable by |
[- {
- "companyId": "000000001111110001000010",
- "billingPeriod": "2017-10",
- "invoiceType": "services",
- "filename": "CDR_SERV_2017-10-10_DR_dr_bp_test.csv",
- "filepath": "000000001111110001000010/2017-10/services/CDR_SERV_2017-10-10_DR_dr_bp_test.csv",
- "invoiceCreationDate": "2017-10-10"
}
]