Share-Invoice
This API is used to share merchant’s invoice By providing correct/required request data/fields with the correct access token, merchant user will be able to share invoice.
- POST
{
https://api-sandbox.sadad.qa/api//invoices/share
}
Permission: Merchant
- Example usage:
{
curl -d "@data.json" -H "Content-Type: application/json" -H "Authorization: {ACCESS_TOKEN}" -X POST https://api-sandbox.sadad.qa/api/invoices/share
}
| Field | Type | Description |
|---|---|---|
| Authorization | String | User's unique access-token |
- Header-Example:
{
"Authorization": "BN79o6YNrY4IPP60UF4JmNEM6O8hX9HVUq0e0HWNyo2tt1jqCT9IWnXSBhfr7Mws"
}
Parameter
| Field | Type | Description |
|---|---|---|
| sentvia | Number | Sent via email - 4 or sms - 3 |
| invoicenumber | String | Invoice number to share |
| receiverEmail (optional) | String | If sharing with SMS then provide cell number and if sharing with email then provide email address |
| receivercellno (optional) | String | If sharing with SMS then provide cell number and if sharing with email then provide email address |
- Request-Example:
For SMS:
{
"sentvia": 4,
"invoicenumber": "SD20XXXXXXXXX9",
"receivercellno": "76XXXXXXX3"
}
For Email:
{
"sentvia": 3,
"invoicenumber": "SD20XXXXXXXXX9",
"receiverEmail": "[email protected]"
}
Success 200
- Success-Response:
{
"result": true
}
Error 4xx
| Name | Description |
|---|---|
| 401 | Authorization Required |
| 400 | Invalid data |
| 404 | Data not found |
- Response (example):
{
"error": {
"statusCode": 401,
"name": "Error",
"message": "Authorization Required"
}
}