Write ERP information

POST /Orders/SetErpInfoList — OMS API · Orders

Writes the ERP order number to orders and their corresponding ERP references to lines. The body is an array; you can send multiple records in a single request.

When to call: After the order is created in ERP.

  • If the tenant setting is enabled (default), the ERP number is also written to the order's shipment packages.
  • The operation is atomic; if an error occurs, no order is updated and HTTP 200 with isSuccess: false is returned.

İstek gövdesi

  • erpLines (object[]): Line-level ERP correspondences.
    • erpLines.erpOrderItemLineId (string, zorunlu): The ERP correspondence of the line.
    • erpLines.sourceOrderItemLineId (string, zorunlu): The sourceOrderItemLineId value of the line in the order.
  • erpOrderNumber (string, zorunlu): ERP order number.
  • sourceOrderNumber (string, zorunlu): The orderNumber value of the order.

Yanıtlar

  • 200: Successful. Always check the isSuccess field in the body.
  • 400: Body validation failed (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core ValidationProblemDetails format; the errors field indicates which fields are invalid.
  • 401: Authorization header missing, token invalid or expired. The body is empty; obtain a new token via /Auth/login.
  • 500: Unexpected server error. This response returns fields in PascalCase (unlike other responses) and includes null fields.

200 yanıt alanları

  • errors (object[]): Detailed error list. Returned only if present.
    • errors.code (string): Error code.
    • errors.message (string): Error message.
  • isSuccess (boolean, zorunlu): true if the operation is successful. It can be false even if HTTP 200 is returned; check every response.
  • statusCode (integer<int32>, zorunlu): Status code. Usually 0 in successful responses; should not be used instead of HTTP status code.
  • errorSource (string): Error source. Returned only if present.
  • correlationId (string): Request tracking ID. Returned only if present.
  • errorMesssage (string): Error message (field name is written with three s in the source). Returned only if there is an error.