importBidActuals
Requires permission biddesk:cost_sheet:edit.
Records a won bid's actual costs sent from the ERP, for a hand-over of either outcome. Each row is matched to a cost line of the approved sheet by the same rules as purchasing; a row that cannot be used is returned with its reason and never fails the call. A row whose reference is already linked to the bid writes nothing, so re-sending is safe. 1 to 500 rows per call. Refused with ACTUALS_NO_HANDOVER. Requires Bid Desk, permission to edit cost sheets and to view costs.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation ImportBidActuals($bidId: ID!, $rows: [BidActualImportRowInput!]!) {
importBidActuals(bidId: $bidId, rows: $rows) {
linked
unmatchedCount
rows {
status
externalRef
index
reason
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation ImportBidActuals($bidId: ID!, $rows: [BidActualImportRowInput!]!) {\n importBidActuals(bidId: $bidId, rows: $rows) {\n linked\n unmatchedCount\n rows {\n status\n externalRef\n index\n reason\n }\n }\n}",
"variables": {
"bidId": "id",
"rows": [
{
"currency": "string",
"externalRef": "string",
"quantity": "string",
"unitCost": "string"
}
]
}
}
EOF
Variables:
{
"bidId": "id",
"rows": [
{
"currency": "string",
"externalRef": "string",
"quantity": "string",
"unitCost": "string"
}
]
}
Response:
{
"data": {
"importBidActuals": {
"linked": 0,
"unmatchedCount": 0,
"rows": [
{
"status": "ALREADY_LINKED",
"externalRef": "string",
"index": 0,
"reason": "BAD_CURRENCY"
}
]
}
}
}
importBidActuals(
bidId: ID!
rows: [BidActualImportRowInput!]!
): BidActualsImportResult!
Arguments
importBidActuals.bidId ● ID! non-null scalar
The handed-over won bid.
importBidActuals.rows ● [BidActualImportRowInput!]! non-null input
The actual-cost rows, 1 to 500.
Type
BidActualsImportResult object
What one import call did.