API Reference

πŸ“‘ API Calls

API Requests Best Practice.

Tyms exposes a modern and intuitive RESTful API over HTTPS, enabling developers to build robust accounting and finance features into their products. Our API supports all standard HTTP methods:

  • GET β€” Retrieve data
  • POST β€” Create new records
  • PUT β€” Update existing records
  • DELETE β€” Remove records

All requests must be authenticated using your secret API key in the request header. See the Authentication page for details.


πŸ”„ Request Rate Limits

To ensure fair use and reliable performance, Tyms enforces rate limits on all API requests:

⏱

Limit: 500 requests per minute per business

If your application exceeds this threshold, Tyms will return a 429 Too Many Requests response. We recommend implementing a retry strategy with exponential backoff.


βš™οΈ Request Requirements

  • All requests must be sent over HTTPS

  • All payloads (for POST, PUT) must be valid JSON

  • Headers must include your API key:

    Authorization: Bearer <your-secret-api-key>
    

🧾 Response Format

All responses are returned in standard JSON format, with meaningful status codes and messages to guide you:

{
  "status": "success",
  "message": "Record created successfully",
  "data": { ... }
}

πŸ“˜ HTTP Status Codes

Tyms follows standard HTTP response codes to indicate the success or failure of API requests. Here’s what each code means and common causes:

CodeMeaningDescription / Possible Cause
200 OKSuccessThe request was successful, and the response contains the expected data.
201 CreatedResource CreatedA new resource (e.g., invoice, customer) was successfully created.
400 Bad RequestInvalid InputThe request was malformed or missing required fields. Ensure your JSON structure and parameters are correct.
401 UnauthorizedInvalid or Missing API KeyThe API key was not provided or is incorrect. Check your authentication header.
404 Not FoundResource MissingThe requested resource doesn’t exist, or the endpoint URL is incorrect.
429 Too Many RequestsRate Limit ExceededYou’ve exceeded the allowed request quota. Pause and retry after some time.
500 Internal Server ErrorServer-side ErrorSomething went wrong on Tyms' servers. Try again later or contact support.

ℹ️

In the event of a 500 error, please include the response and timestamp in your support ticket for faster resolution.


πŸ“¦ Pagination

Endpoints that return lists (like GET /sales) use pagination to keep responses lightweight and efficient.

Query Parameters:

  • limit β€” Number of records per page (default: 10)
  • page β€” Page number to retrieve

Example:

GET /sales?limit=20&page=1

βœ… Developer Tips

  • Use GET for safe read operations, and POST, PUT, DELETE for data mutations.
  • Always validate your request payloads before sending them.
  • Implement retries and backoff strategies, especially for 429 and 500 errors.
  • Use the appropriate environment (sandbox vs production) to prevent data loss.

Need help debugging a request? Contact us at [email protected].