Write invoice information
POST /OrderPackage/SetOrderPackageInvoiceInfoList — OMS API · Packages
Writes the invoice number and invoice link to the packages. The body is an array; you can send multiple records in a single request.
When to call: When the package invoice is issued.
- If
isChangeStatus: true, the package and its lines are set toInvoicedstatus; if the workflow does not allow the transition, HTTP 200 withisSuccess: falseis returned. - If
isChangeStatusisfalse/empty, the status does not change; the invoice is written only if there is no invoice information yet in the package and bothinvoiceNumberandinvoiceLinkare sent together. - If no package is found,
errorMesssage: "Package not found!"is returned.
İstek gövdesi
invoiceLink(string): Invoice access link.invoiceNumber(string): Invoice number.isChangeStatus(boolean): Iftrue, the package status is set toInvoiced(returns error if workflow is not suitable). Iffalse/empty, status does not change; invoice information is written only if there is no invoice yet in the package and both number and link are sent together.sourcePackageId(string, zorunlu): The package'ssourcePackageIdvalue.
Yanıtlar
- 200: Successful. Always check the
isSuccessfield in the body. - 400: Body validation failed (missing required field, type mismatch, or malformed JSON). The response is in ASP.NET Core
ValidationProblemDetailsformat; theerrorsfield indicates which field is invalid. - 401:
Authorizationheader missing, token invalid or expired. Body returns empty; get a new token via/Auth/login. - 500: Unexpected server error. This response returns fields in PascalCase (unlike other responses) and includes
nullfields.
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):trueif the operation is successful. It can befalseeven if HTTP 200 is returned; check in every response.statusCode(integer<int32>, zorunlu): Status code. Usually0in 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 spelled with threesin the source). Returned only if there is an error.