HTTP status codes
- 200 OK — The request was successful.
- 201 Created — The requested resource was successfully created.
- 204 No Content — The request was successfully processed, but there is no content to return in the response body.
- 301 Moved Permanently — The requested resource has been permanently moved.
- 400 Bad Request — The request contains a missing, invalid, or malformed parameter. Check the API documentation and request syntax, then try again.
- 401 Unauthorized — A valid API access token was not provided. Authentication is required for all API requests. See the authentication documentation for more information.
- 403 Forbidden — The authenticated API access token does not have permission to perform the requested operation.
- 404 Not Found — The requested endpoint, method, or resource does not exist. Verify that the request path, HTTP method, and resource identifier are correct.
- 409 Conflict — The request could not be completed because it conflicts with the current state of the requested resource. This may occur when attempting to create or update a resource that already exists, or when the requested operation conflicts with existing data.
- 429 Too Many Requests — The API rate limit has been exceeded. Reduce the request frequency and retry after the appropriate interval.
- 500 Internal Server Error — An unexpected error occurred on the Marty API. Retry the request and contact support if the issue persists.
- 503 Service Unavailable — The Marty API is temporarily unavailable, typically due to maintenance or an outage. Retry the request using exponential backoff.
Example error response
When an API request fails, the response body may contain additional information that can help identify the cause of the error.detail field are usually the best places to start.
If you need additional help, contact Marty support at https://support.marty.hr/ and include the error details, especially the traceId and requestId, to help the support team investigate the issue.
Paginated responses
Endpoints that return collections of resources may use pagination to divide large result sets into smaller pages. A paginated response contains the resources for the current page in thedata array, together with pagination metadata describing the current page and the total number of available records.
Example paginated response
Pagination fields
data— The resources returned for the current page.selected— Selected resources, when applicable to the endpoint.totalCount— The total number of resources matching the request.totalPages— The total number of pages available.page— The current page number.pageSize— The maximum number of resources returned per page.
totalCount is 20 and pageSize is 20, the result contains one page. If totalCount is 45 and pageSize is 20, the result is divided across three pages.
When an endpoint supports pagination parameters, use them to request additional pages until all required resources have been retrieved..png?fit=max&auto=format&n=sUS7VTlhqOQx_KUw&q=85&s=ad09d04a9a1eb5c6546c4e843a893b2b)
