# API Reference
Comprehensive reference for integrating with CargoSprint API endpoints
Version: 0.0.1
## Servers
```
https://{service}-{environment}.cargosprintgroup.com
```
Variables:
- `environment`: application environment (empty for prod)
Enum: "staging", "development", "(empty for production)"
- `service`: service host name
Enum: "oauth", "cart", "invoices", "facilities", "payments"
## Download OpenAPI description
[API Reference](https://developer.cargosprint.com/_bundle/sprintpay/openapi.yaml)
## Oauth
The SprintPay API uses Authorization Tokens to authenticate requests.
SprintPay’s OAuth system that uses a access token that is private and reserved for specific official partnerships. To get set up with access please inquire directly with your SprintPay relationship manager.
This API enables partners to register their own systems or authorized third-party systems to be able to execute actions.
### Get authorization token
- [POST /oauth2/token](https://developer.cargosprint.com/sprintpay/openapi/oauth/getauthorizationtoken.md): Get client authorization token for access to backend APIs.
## Facilities
API reference for facilities endpoints and webhooks.
The /get/facilities is an endpoint that allow you to retrieve facilities contacts information on file including Facility Name, Airport Code, Firms Code, Phone, Address, City and Delivery.
### Get all facilities
- [GET /facilities](https://developer.cargosprint.com/sprintpay/openapi/facilities/getfacilities.md): Get facilities by query.
## Cart
API reference for cart endpoints and webhooks.
The /post/payments is an endpoint that allow you to manage the end user’s cart, initiate and process the payments to the facilities.
### Make payment
- [POST /payment](https://developer.cargosprint.com/sprintpay/openapi/cart/makepayment.md): Make a payment to a facility.
## Invoices
API reference for invoices endpoints and webhooks.
The /post/external/downloadinvoices is an endpoint that allow you to retrieve and manage open and paid invoices. This will be retrieved as an Excel file with information such as Cargo Payment Created Date, Email, Airport Code, Cargo Payment: Payment Reference #, Cargo Facility: Airline Cargo Facility Name, Airline AWB #, Customer Reference #, Cargo Payment: Amount and Total Invoice Amount.
### Get invoices
- [POST /external/downloadInvoices](https://developer.cargosprint.com/sprintpay/openapi/invoices/getinvoices.md): Download invoices.
## Payments
API reference for payments endpoints and webhooks.
The /post/external/paymentConfirmation is an endpoint that allows you to retrieve and manage electronic payment confirmations. This will be retrieved as a PDF file or a ZIP with multiple PDF files containing information such as Cargo Payment Created Date, Email, Facility Branch, Cargo Payment: Payment Reference #, Cargo Facility: Airline Cargo Facility Name, Airline AWB #, Customer Reference #, Cargo Payment: Amount and Total Invoice Amount.
### Get payment confirmation
- [POST /external/paymentConfirmation](https://developer.cargosprint.com/sprintpay/openapi/payments/getpaymentconfirmation.md): Download payment confirmation document.