Request and Response
This is a RESTful API. All requests use the base URL: https://api.nomod.com
.
Responses to each request are returned as JSON objects containing either the requested data or a valid error message with an error code, as outlined below.
Error Codes
The following table lists all possible error codes that the API may return if something goes wrong:
Error Code | Meaning |
---|---|
401 | Unauthorized — Your API key is invalid. |
403 | Forbidden — Insufficient rights. |
404 | Not Found — The requested resource does not exist. |
429 | Too Many Requests — You have exceeded the rate limit. |
500 | Internal Server Error — A problem occurred on the server. Try again later. |
503 | Service Unavailable — Either a deployment is in progress, or Nomod services are currently down. |
Below is a list of additional error codes with descriptions:
List of Error Codes
not_authenticated
: Missing authentication credentials.throttled
: Request exceeds the rate limit and is throttled.not_found
: Requested resource not found.invalid_business_id
: Non-existent or invalid business ID.business_not_enabled
: Business status is not enabled.invalid_email
: Improperly formatted email address.field_required
: A required field is missing.invalid_amount
: The amount must be greater than zero and within limits.invalid_currency
: Unsupported or incorrect currency code.missing_required_items
: At least one required item is missing.exceeds_item_limit
: Provided items exceed the allowed limit.invalid_country_code
: Unsupported or invalid country code.invalid_province_code
: Province does not belong to the specified country.invalid_customer
: Customer does not exist.invalid_due_date
: The due date cannot be earlier than the start date.already_enabled
: The resource is already enabled.already_disabled
: The resource is already disabled.invalid_status
: Invalid status for the link.missing_status
: Status is missing.already_deleted
: The link has already been deleted.invalid_refund_amount
: Invalid refund amount.refund_amount_exceeds
: Refund amount exceeds the total charge amount.charge_not_paid
: The charge has not been successfully paid.charge_already_refunded
: The charge has already been refunded.charge_not_found
: Charge with the given ID not found.already_invited
: User is already invited.customer_already_exists
: Customer already exists.internal_server_error
: Unexpected server-side error.service_unavailable
: Server is temporarily unavailable.
Paging Information
For large lists, the API returns partial results in a single “page.” Each page contains the following properties:
Property | Description |
---|---|
count | The total number of items available across all pages. |
next | The URI for the next page of this list, or null if there are no more pages. |
previous | The URI for the previous page of this list, or null if this is the first page. |
results | The array containing the results of the current page. |
Data Formats
Phone Numbers
Our system exclusively accepts and returns phone numbers in the E.164 format. An example of this format is:
+971500000001
Dates & Times
The API exclusively accepts and returns date and time values in GMT, following the ISO 8601 standard, which is compatible with RFC 2822. An example date-time format is:
2024-08-21T13:29:22.809384Z