The Submission REST API is designed to expose the capability to submit invoice data to the corporate client.

 

Create a Submission Request

The operation creates a new submission request.

Request

Method Request URI HTTP Version
POST {eBHDomain}/submissions/api/v1/SubmissionRequests HTTP/1.1

Request Headers

The following table describes required and optional request headers.

Request header Description
ProducerId Required. Specifies the client on behalf of which the request is sent.
ProviderKey Required. Specifies the access token.
Content-Type Required. Specifies the body format. A list of valid values: application/xml.
Username Optional. Specifies the user on behalf of which the request is sent. The value is used for reporting purposes only and defined by the caller.
Accept Optional. Specifies the expected response format. A list of valid values: application/json (default), */*. 
InvoiceType Optional. Specifies the type of submitting invoice. A list of valid values: ESF, UBF (default).
InvoiceState Optional. Specifies the state of submitting invoice. A list of valid values: FinalInvoice (default), Proforma.

Request Body

XML payload in one of the following formats: ESF, UBF.

Response

The response includes an HTTP status code, a set of response headers and a response body, which contains the identifier of the created submission request.

Status Codes

A successful operation returns status code 201 (Created).

Status code Description
201 CREATED The request was created successfully. See the response body for details.
400 BAD REQUEST The request was incorrectly formatted, missing a required header or parameters were invalid.
401 UNAUTHORIZED The Provider Key is not authorized.
406 NOT ACCEPTABLE Provided Accept HTTP Header is not supported.
413 PAYLOAD TOO LARGE Too large payload size.
415 UNSUPPORTED MEDIA TYPE Provided Content-Type HTTP Header is not supported.
500 INTERNAL SERVER ERROR Something went wrong.

Response Headers

Response header Description
Location The location header indicates the URL to the created resource.
OperationId The unique identifier associated with the request.

Response Body

A request was successfully processed:

The identifier of the created submission request returned.

{
  "Id": "68e222bc-23d2-4417-b24c-3a0f63206863",
  "PostTime": "2019-01-09T09:18:18.7367442Z",
  "Invoices": [
    {
      "Id": "21355",
      "PayorOrgId": "000015",
      "PayorOrgEbillingId": 4388,
      "Attachments": []
    }
  ]
}

An error occurred while processing a request:

{
   "Message": "An unexpected error occurred. Please, contact the support team."
}

An error occurred during XSD validation while processing a request:

{
   "Message": "ErrorMessage",
   "ModelState": {
      "InvoicePayload": [
         "The payload does not match expected format"
      ]
   }
}

 

Add Attachment

The operation associates an attachment with an invoice element.

Request

Method Request URI HTTP Version
POST {eBHDomain}/submissions/api/v1/SubmissionRequests/{SubmissionId}/invoices/{Id}/attachments HTTP/1.1

URI Parameters

The following table describes required and optional URI parameters.

Parameter Description
SubmissionId

Required. A submitted request identifier returned in the response from Submission API POST request (root id).

Id Required. A submitted invoice identifier returned in the response from Submission API POST request (nested invoice id)

Request Headers

The following table describes required and optional request headers.

Request header Description
ProducerId Required. Specifies the client on behalf of which the request is sent.
ProviderKey Required. Specifies the access token.
Content-Type Required. Specifies the body format. A list of valid values: application/json.
Username Optional. Specifies the user on behalf of which the request is sent. The value is used for reporting purposes only and defined by the caller.
Accept Optional. Specifies the expected response format. A list of valid values: application/json (default), */*. 

Request Body

The following table describes required and optional body string parameters.

Parameter Description
AttachmentId Required. Specifies the id returned in the response from Attachment API POST request.
AssociatedElementType

Optional. Specifies the type of an invoice’s node that the attachment is related to. The list of valid values: Invoice (default), Fee, Expense.

AssociatedElementId Optional. Specifies the identifier of an invoice’s node that the attachment is related to.
{
    "AttachmentId": "2147483647",
    "AssociatedElementId": "53324",
    "AssociatedElementType": "Fee"
}

Response

The response includes an HTTP status code, a set of response headers and a response body, which contains the identifier of the created association.

Status Codes

A successful operation returns status code 201 (Created).

Status code Description
201 CREATED The request was created successfully. See the response body for details.
400 BAD REQUEST The request was incorrectly formatted, missing a required header or parameters were invalid.
401 UNAUTHORIZED The Provider Key is not authorized.
403 FORBIDDEN A submission request does not allow to associate attachments or access is forbidden.
404 NOT FOUND A submission request or invoice was not found.
406 NOT ACCEPTABLE Provided Accept HTTP Header is not supported.
409 CONFLICT An attachment is already associated.
415 UNSUPPORTED MEDIA TYPE Provided Content-Type HTTP Header is not supported.
500 INTERNAL SERVER ERROR Something went wrong.

Response Headers

Response header Description
Location The location header indicates the URL to the created resource.
OperationId The unique identifier associated with the request.

Response Body

A request was successfully processed:

The identifier of the created association returned.

{
    "Id": "319255",
    "AttachmentId": "2147483647",
    "AssociatedElementId": "53324",
    "AssociatedElementType": "Fee"
}

An error occurred while processing a request:

{
   "Message": "An unexpected error occurred. Please, contact the support team."
}

 

Commit a submitted invoice

Mark a submitted invoice as ready to send.

Request

Method Request URI HTTP Version
PUT {eBHDomain}/submissions/api/v1/SubmissionRequests/{SubmissionId}/invoices/{Id}/ready HTTP/1.1

URI Parameters

The following table describes required and optional URI parameters.

Parameter Description
SubmissionId

Required. A submitted request identifier returned in the response from Submission API POST request (root id).

Id Required. A submitted invoice identifier returned in the response from Submission API POST request (nested invoice id)

Request Headers

The following table describes required and optional request headers.

Request header Description
ProducerId Required. Specifies the client on behalf of which the request is sent.
ProviderKey Required. Specifies the access token.
Content-Type Required. Specifies the body format. A list of valid values: application/json.
Username Optional. Specifies the user on behalf of which the request is sent. The value is used for reporting purposes only and defined by the caller.
Accept Optional. Specifies the expected response format. A list of valid values: application/json (default), */*. 

Request Body

Empty.

Response

The response includes an HTTP status code, a set of response headers and a response body, which contains the identifier of the created association.

Status Codes

A successful operation returns status code 204 (No content).

Status code Description
204 NO CONTENT The request was successful.
400 BAD REQUEST The request was incorrectly formatted, missing a required header or parameters were invalid.
401 UNAUTHORIZED The Provider Key is not authorized.
404 NOT FOUND A submission request or invoice was not found.
406 NOT ACCEPTABLE Provided Accept HTTP Header is not supported.
409 CONFLICT A submitted invoice was already sent to a vendor.
415 UNSUPPORTED MEDIA TYPE Provided Content-Type HTTP Header is not supported.
500 INTERNAL SERVER ERROR Something went wrong.

Response Headers

Response header Description
OperationId The unique identifier associated with the request.

Response Body

A request was successfully processed:

Empty.

An error occurred while processing a request:

{
   "Message": "An unexpected error occurred. Please, contact the support team."
}