Create Ticket
Create a ticket in Odoo
Endpoint
POST /odoo_tickets
Authentication
A Token must be sent in the header using
auth_party:odoo
Request
Content-Type application/json
Required Parameters:
{
"Request": "RF/100907",
"RequestType": "withdrawal",
"Client": "Hany test",
"PhoneNumber": "False",
"mobile": "False",
"TradingNumber": "False",
"SugarClientID": "1234",
"amount": "1.00",
"DestinationCountry": "Egypt",
"DestinationCity": "Cairo",
"OperatingUnit": "Equiti Jordan",
"CommissionType": "Equiti Jordan",
"TransferDate": "2024-12-19 13:58:11",
"Currency": "USD",
"LocalCurrency": "EGP",
"LocalCurrencyAmount": "50.00",
"ArabicName": "False",
"comment": "False",
"address": "False",
"payment_type": "False",
"key_address": "test",
"vodafone_number": "False",
"internal_notes": "False",
"order_id": "False",
"transaction_id": "False",
"wallet_number": "False",
"wallet_address": "False",
"payment_method_transfer_id": "CRP"
}
Response
{
"isSuccessful": true,
"hasContent": true,
"code": 200,
"message": null,
"detailed_error": null,
"data": {
"id": 2750
}
}
Explanation
isSuccessful: Indicates whether the operation was successful.hasContent: Indicates if there is data returned.code: Response status code (200 means success).data.id: The ID of the created ticket.
Possible Error Codes
| Code | Description |
|---|---|
| 400 | Bad request (missing or invalid data) |
| 401 | Unauthorized (authentication failed) |
| 403 | Forbidden (insufficient permissions) |
| 500 | Internal server error |
Example Error Response (400 Bad Request)
{
"isSuccessful": false,
"hasContent": false,
"code": 400,
"message": "Missing required field: SugarClientID",
"detailed_error": "SugarClientID is required"
}
!!! note
- Make sure that `Request` attribute have to be a unique value to create new ticket, otherwire the existing ticket id will return.