Skip to content

Attach documents to a sale

This method allows documents to be attached to a sale, for example disability certificates or large family/single-parent family supporting documents.

Access method

PUT /Sale

Request structure

The request Content-Type must be multipart/form-data, including the following fields:

  • SaleId: (string) Required. Sale identifier.
  • Attachments: (list[list]) Required. Array in which each element is a byte array containing the document to be attached.
Information

The sale identifier is obtained in the response of the sale confirmation call. That function returns a list of sales with their identifiers (Id). That identifier is the one that must be used in this field.

Request example

Examples

 Ejemplo de petición multipart/form-data:

Content-Type: multipart/form-data; boundary="----MyGreatBoundary" Content-Length: 7383

------MyGreatBoundary Content-Type: text/plain; charset=utf-8 Content-Disposition: form-data; name=SaleId 5005558512577665890

------MyGreatBoundary Content-Type: application/pdf Content-Disposition: form-data; name=Attachments; filename="documentation.pdf"; filename*=utf-8''documentation.pdf Array de bytes para documentation.pdf

------MyGreatBoundary Content-Type: application/pdf Content-Disposition: form-data; name=Attachments; filename="documentation2.pdf"; filename*=utf-8''documentation2.pdf Array de bytes para documentation2.pdf

Response structure

  • Timestamp: (dateTime). Time at which the request was processed. ISO 8601 format (yyyy-MM-ddThh:mm:ss.fffffff).

  • Success: (boolean). Value that indicates whether the call was processed correctly or not.

  • Errors: (list). Array of errors.
    • Error: (object).
      • ErrorMessage: (string). Error message explaining why the request was not successful. If it was correct, it will return null.
      • ErrorCode: (int). Code that identifies the error.
  • ErrorEntityBreakDown (list): list that contains objects with the name and ID in case of error.
    • Id (string): identifier
    • Name (string): related name of the identifier.

Response example

Examples

 Ejemplo de respuesta JSON formateada:

{
    "Timestamp": "2024-07-13T00:00:00",
    "Success": true
}