Skip to content

Update a service sheet

put
https://api.mercadoe.com/v1/service-sheets-document/service-sheets/{serviceSheetId}

Replaces the data of one service sheet item. The processing is asynchronous: the result is sent to the webhook with the returned correlationId.
costObjects:
- For every cost object, send its share in costRate, quantity or costAmount. When more than one is sent, costRate is used first, then quantity, then costAmount, and the others must match it (tolerance 0.01), as returned by GET /v1/service-sheets-document/{serviceSheetHeaderId}. The shares must add up to 100%, to the item quantity or to the item total value (the items when sent, otherwise quantity x value), rounded to 2 decimals. A single cost object without a share counts as 100%. These rules return 400. Without items in the body, the item total comes from the saved items, so the quantity and value checks are reported in the webhook.
- The cost center must exist in ME. This is checked asynchronously, and an unknown one is reported as an error in the webhook.
- Omitting costObjects keeps the saved ones. Resending the saved apportionment changes nothing.
- Saved cost objects can only be replaced before the service sheet is sent to approval. The replacement is recorded in the service sheet history, and the webhook message includes a warning.
- After the service sheet is sent to approval (and while it is approved, integrated, accepted or canceled), a change to the cost objects is refused in the webhook: the service sheet must be returned or rejected first.

Request

Headers

X-ME-CORRELATION-ID
string
Internal client code to be identified in the webhook. It can be, for example, a product code in your ERP, an order number, etc.

Path Parameters

serviceSheetId
int32
required
ME Service sheet Id. Use the serviceSheetId of the item returned by GET /v1/service-sheets-document/{serviceSheetHeaderId}

Body

application/json
clientOrderId
string | null
Order ID in the client’s ERP
itemId
int32 | null
Item Id
clientServiceSheetId
string
Service Sheet ID in the client’s ERP
description
string | null
Description
initialDate
date-time
Service sheet Initial Date
issueDate
date-time
Service sheet Issue Date
endDate
date-time
Service sheet End Date
status
int32
Service sheet status
createdBy
string | null
User who created the service sheet
approvalDate
date-time | null
Service sheet approval date
approvalNote
string | null
Notes on the approval
clientContractId
string | null
Contract ID in the client’s ERP
clientContractItemID
int32 | null
Contract item ID in the client’s ERP
contractItemId
int32 | null
ME Contract item ID
complement
string | null
Service sheet complement description
category
string | null
Service sheet category
quantity
double
Item quantity
measurementUnit
string
Item measurement unit
value
double
Item value
items
array of object | null
Service sheets items
orderId
int32 | null
ME Order ID
attributes
array of object | null
costObjects
array of object | null
Cost objects of the item, with the apportionment. On PUT, omitting it keeps the saved cost objects.

Responses

202
400
404
Accepted

Body

application/json
correlationId
string
Credentials
shell