Skip to content
Hydda One API
Esc
↑↓navigate↵open⌘Jpreview

Reject up to 200 invoice proposals

Reject several proposals from the verification queue in one request. Each item is the reject body plus proposalId, and a proposal appears at most once. Each item is handled on its own, in the order sent, exactly as the single route handles it. A refused item changes nothing for the others, and its result carries the status and problem the single route answers, with the same code. The request itself answers 200 unless the token, the integration configuration or the body is refused, which happens before any item is handled. On a 429, wait as long as Retry-After says, then send the same batch again.

POST/v1/billing/batch/reject-proposals
Authorization
AuthorizationOAuth2 access token · headerrequired

An access token for an Application, from the client_credentials grant. An integration of your own uses the same grant. A connector from Hydda gets its token from the installation-token grant instead. Send it as Authorization: Bearer <token>.

Request body
requiredapplication/json
itemsobject[]required

From 1 to 200 items. They are handled in this order.

min items 1 · max items 200
Show properties
Array of object
reasonstringrequired

The reason in your own words, 1 to 1000 characters.

min length 1 · max length 1000
proposalIdstring<uuid>required

The id of the proposal this item rules on.

Responses
200

One result per item, in the order sent.

resultsobject[]required

One result per item, in the order the items were sent.

Show properties
Array of object
Any of:
object
statusnumberrequired

Always 200: the item was handled.

Allowed:200
resultInvoiceProposalrequired

Invoice material awaiting your verification. If you pass it, it becomes an invoice. Amounts are in minor units of currency.

Show properties
idstring<uuid>required

The proposal id. Pass or reject the proposal by it.

invoiceRunIdstring<uuid>required

The invoice run that created the proposal.

invoiceNumberinteger

Hydda One's own number, which the invoice keeps if the proposal passes. Absent only on some older rejected or cancelled proposals.

max 9007199254740991
organizationIdstring<uuid>required

The organization the proposal belongs to.

operationalContextIdstring<uuid>required

The operational context the proposal was created in.

contractIdstring<uuid>required

The contract the proposal bills.

recipientAgentIdstring<uuid>required

The customer the proposal bills.

recipientAgentNamestringrequired

The customer's name as written on the proposal.

billingAccountIdstring<uuid>required

The billing account the invoice would be sent to.

documentKindstringrequired

Whether the document is an invoice or a credit note. A credit note names the invoice it credits.

Allowed:invoicecredit-note
creditedInvoiceIdstring<uuid>

On a proposed credit note, the invoice it credits. Absent otherwise.

billingStreamstringrequired

Where the charges come from: contractual for the contract's own products, running for purchases beside it, such as bookings.

Allowed:contractualrunning
requestedInvoiceDatestring<date>required

The invoice date to issue with, as an ISO date (YYYY-MM-DD).

requestedDueDatestring<date>

The due date to issue with, as an ISO date. Absent on a credit note.

paymentTermsDaysinteger

The payment terms in days that give the requested due date. Absent on a credit note.

min 0 · max 9007199254740991
statusstringrequired

Where the proposal stands: proposed awaits your verdict, passed and rejected are your verdicts, and cancelled means an operator withdrew it.

Allowed:proposedpassedrejectedcancelled
currencystringrequired

An ISO 4217 currency code, for example SEK.

Allowed:SEKNOKDKKEURUSDGBP
totalNetMinorUnitsintegerrequired

The total excluding VAT, in minor units. Negative on a credit note.

min -9007199254740991 · max 9007199254740991
totalVatMinorUnitsintegerrequired

The total VAT, in minor units.

min -9007199254740991 · max 9007199254740991
totalGrossMinorUnitsintegerrequired

The total including VAT, in minor units.

min -9007199254740991 · max 9007199254740991
externalReferencestring

Your own id for the invoice, attached when you passed the proposal.

rejectionReasonstring

Why the proposal was rejected, as it was reported.

passedAtstring<date-time>

When the proposal was passed, as an ISO 8601 timestamp in UTC.

rejectedAtstring<date-time>

When the proposal was rejected, as an ISO 8601 timestamp in UTC.

cancelledAtstring<date-time>

When an operator cancelled the proposal, as an ISO 8601 timestamp in UTC.

createdAtstring<date-time>required

When the proposal was created, as an ISO 8601 timestamp in UTC.

updatedAtstring<date-time>required

When the proposal last changed, as an ISO 8601 timestamp in UTC.

object
statusintegerrequired

The HTTP status the single route answers this refusal with, such as 400, 403, 404 or 409. 500 when the item failed unexpectedly.

min 400 · max 599
problemProblemrequired

An RFC 9457 problem details body. Every failed request returns one.

Show properties
typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

400

The request is not valid, or a business rule refused it. code names the rule.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request, when the failure has one. Match on this, not on detail.

Allowed:VALIDATION_FAILEDBILLING_INTEGRATION_NOT_CONFIGUREDBILLING_INTEGRATION_GATE_NOT_DECLARED
parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

401

The access token is missing, expired or not valid.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

403

The token does not allow this request.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request. Match on this, not on detail.

parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

429

Too many requests. Wait and try again.

typestringrequired

Always about:blank.

titlestringrequired

The HTTP status phrase, for example Not Found.

statusintegerrequired

The HTTP status code.

min -9007199254740991 · max 9007199254740991
detailstring

What went wrong, for a person to read. Do not parse it.

codestring

Names the rule that refused the request, when the failure has one. Match on this, not on detail.

Allowed:BILLING_BATCH_THROTTLED
parametersobject

Values the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.

issuesobject[]

With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.

Request
curl -X POST 'https://api.hydda.one/v1/billing/batch/reject-proposals' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "items": [
    {
      "reason": "string",
      "proposalId": "9c0e116a-cd43-4035-9c2d-b9b55ce4f74b"
    }
  ]
}'
Response
{
  "results": [
    {
      "status": 200,
      "result": {
        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
        "invoiceRunId": "d023feec-6ce3-4d83-8326-53006f2d50e7",
        "invoiceNumber": 1,
        "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
        "operationalContextId": "a3f64ce2-1602-4028-b89f-abb2bb8c71bc",
        "contractId": "dbf32426-cf38-4818-9c6e-3230d889fa51",
        "recipientAgentId": "9857c18a-555f-4729-b9ab-629537b29cdc",
        "recipientAgentName": "string",
        "billingAccountId": "56a302e4-9416-417d-adcf-22ac99649ba3",
        "documentKind": "invoice",
        "creditedInvoiceId": "74ebea99-ce39-4315-8d5b-103e18e641e4",
        "billingStream": "contractual",
        "requestedInvoiceDate": "2019-08-24",
        "requestedDueDate": "2019-08-24",
        "paymentTermsDays": 0,
        "status": "proposed",
        "currency": "SEK",
        "totalNetMinorUnits": -9007199254740991,
        "totalVatMinorUnits": -9007199254740991,
        "totalGrossMinorUnits": -9007199254740991,
        "externalReference": "string",
        "rejectionReason": "string",
        "passedAt": "2019-08-24T14:15:22Z",
        "rejectedAt": "2019-08-24T14:15:22Z",
        "cancelledAt": "2019-08-24T14:15:22Z",
        "createdAt": "2019-08-24T14:15:22Z",
        "updatedAt": "2019-08-24T14:15:22Z"
      }
    }
  ]
}

Was this page helpful?