1. U4 ERPx
  2. API Reference

API Reference

Welcome to the ERPx API Reference. This documentation provides a structured collection of RESTful endpoints, organized to match the ERPx user interface for ease of navigation and familiarity.

Each section corresponds to a functional area in the ERPx and includes:

  • Index of available APIs within the area.
  • Endpoint details for querying, creating, updating, or deleting objects.
  • Data objects for querying.

Developers can use these APIs to automate and integrate ERPx processes, enabling seamless interaction with modules such as Accounting, Project management, Procurement, and more.

The structure and organization of this reference are designed to closely resemble the ERPx menus, making it intuitive for both technical and business users to locate and understand the available API documentation.

Handling API responses

Understanding and properly handling HTTP response codes are critical for building reliable integrations with ERPx APIs. Every response includes a status code that indicates whether your request succeeded or failed, and how to proceed.

Status code categories

Code RangeCategoryDescription
200-299SuccessYour request was successfully received, understood, and accepted.
300-399RedirectionAdditional action is required to complete the request.
400-499Client ErrorThe request contains invalid syntax or cannot be fulfilled.
500-599Server ErrorThe server encountered an error when processing a valid request.

Common status codes

Success responses

CodeStatusWhen it appears
200OKRequest completed successfully.
201CreatedResource is successfully created (POST requests).
202AcceptedRequest is accepted for processing.
204No ContentRequest is successful, no content to return.

Client error responses

CodeStatusWhen it appearsAction required
400Bad RequestValidation errors or malformed requestReview request’s syntax and parameters.
401UnauthorisedMissing or invalid authenticationVerify API credentials.
403ForbiddenAuthenticated but lacking permissionsCheck user access rights.
404Not FoundResource or endpoint doesn’t existVerify URI and resource ID.
405Method Not AllowedHTTP method is not supportedUse the correct HTTP method (GET, POST, etc.).
409ConflictConcurrency or duplicate resource errorSee Conflict Errors below.
413Payload too largeYour request’s data is too bigSee Limits & Quotas section.
422Unprocessable EntityBusiness logic validation failedSee Validation Errors below.
429Too Many RequestsRate limit exceededImplement backoff and retry logic.

Server error responses

CodeStatusWhen it appearsAction required
500Internal Server ErrorUnexpected server-side errorRetry request; contact support if persists.
503Service UnavailableService temporarily unavailableImplement retry with exponential backoff. See Limits & Quotas section.

Detailed error scenarios

409 Conflict errors

The 409 Conflict status indicates a concurrency or duplication issue:

Scenario 1: Concurrent updates

  • Another user modified or deleted the resource after you retrieved it but before you updated it.
  • Error Code: 3090

Scenario 2: Duplicate resource

  • This is an attempt to create a resource that already exists with the same unique identifiers.
  • Error Code: 3090

Example response:

{
  "code": "3090",
  "message": "Data has been changed or deleted by another user"
}

How to handle:

  • Retrieve the latest version of the resource.
  • Reapply your changes.
  • Retry the update with the current data.

404 Not Found errors

The 404 Not Found status occurs in two scenarios:

Invalid endpoint

The API endpoint URI doesn’t exist.

Error code: 1030

Example:

GET /v1/customers-does-not-exist/123456
{
  "code": "1030",
  "message": "No resource found matching request URI"
}

Resource doesn’t exist

The endpoint is valid, but the specific resource ID doesn’t exist.

Error code: 1040

Example:

GET /v1/customers/123456
{
  "code": "1040",
  "message": "Requested entity not found"
}


422 Validation errors

The 422 Unprocessable Entity status indicates business logic or validation failures. The response includes detailed error information embedded in the resource.

Error code: 3010 - Model validation error

Response structure:

  • Failed fields are highlighted in the response.
  • A notificationMessages object that contains detailed errors for each field appears.

Example:

PATCH /v1/customers/2245

Request Body:
[
  {
    "path": "/countryCode",
    "op": "Replace",
    "value": "ZZ"
  }
]
{
  "customerId": "2245",
  "customerName": "Demo Company AS",
  "aliasName": "DEMO",
  "companyId": "EN",
  "companyRegistrationNumber": "",
  "countryCode": "ZZ",
  "lastUpdated": {
    "updatedAt": "2015-10-20T13:00:24.000",
    "updatedBy": "SUPERUSER"
  },
  "notificationMessages": {
    "countryCode": [
      {
        "code": 3010,
        "message": "Illegal value."
      }
    ]
  }
}

How to handle:

  1. Parse the notificationMessages object.
  2. Identify which fields failed the validation.
  3. Correct the invalid values.
  4. Resubmit the request.

Error handling best practices