# EasyPost Connect Public API

This API enables partners to programmatically manage the creation and consultation of outgoing sendings, as well as the automated consultation of incoming PePPOL documents. It provides endpoints for handling jobs (groupings of sendings), individual sending events, and workflows, supporting integration and automation of document exchange processes.

Version: 1.0.0

## Servers

```
https://api.dev.connect.easypost.eu
```

## Security

### Security

Type: oauth2

### api_key

Type: apiKey
In: header
Name: x-api-key

## Download OpenAPI description

[EasyPost Connect Public API](https://doc.dev.connect.easypost.eu/_bundle/public-api-production/openapi.yaml)

## Jobs

Entity representing the grouping of one or multiple sendings, created simultaneously from the same resource file (PDF, ZIP, CSV or XML). All the Job mails, internally referred to as SendingEvents, will share the same job ID. The Job is linked to one specific Workflow used to describe all the channels to be used to reach the recipient.

### Retrieve Job Based on ID

 - [GET /jobs/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/jobs/jobscontroller_findone.md): Retrieve Job based on ID

### Retrieve Jobs Sorted by Ascending StartDate and Filters

 - [GET /jobs](https://doc.dev.connect.easypost.eu/public-api-production/openapi/jobs/jobscontroller_findall.md): Retrieve Jobs sorted by ascending startDate. By default, the response contains the 100 (maxItems property) first items. To retrieve the next items matching the request, use the query parameter 'after' with the ID the last item

### Create Job For A Single File Workflow

 - [POST /jobs/single-file](https://doc.dev.connect.easypost.eu/public-api-production/openapi/jobs/jobscontroller_createsinglefilejob.md): Create a Job for a workflow based on a unique file. It returns the Job unique identifier and the url where to upload the file to be processed. Note that the Job will be in AWAITING_FOR_FILE status for maximum 2 hours and will be deleted if no file is provided.

### Create Job For A Payload PDF Workflow

 - [POST /jobs/payload-pdf](https://doc.dev.connect.easypost.eu/public-api-production/openapi/jobs/jobscontroller_createpayloadpdfjob.md): Create a Job for a workflow based on a PDF payload. It stores the provided payload and returns the url where to upload the PDF file to be processed. Note that the Job will be in AWAITING_FOR_FILE status for maximum 2 hours and will be deleted if no file is provided.

### Create Job For A Payload Word Workflow

 - [POST /jobs/payload-word](https://doc.dev.connect.easypost.eu/public-api-production/openapi/jobs/jobscontroller_createpayloadwordjob.md): Create a Job for a workflow based on a Word payload. It stores the provided payload (including template data) and returns the Job unique identifier.

## SendingEvents

Entity representing a mail to be sent to one recipient using a specific Workflow.

### Retrieve SendingEvent Based on ID

 - [GET /sending-events/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/sendingevents/sendingeventscontroller_findone.md): Retrieve SendingEvent based on ID

### Retrieve SendingEvents Sorted by Ascending Start Date and Filters

 - [GET /sending-events](https://doc.dev.connect.easypost.eu/public-api-production/openapi/sendingevents/sendingeventscontroller_findsendingevents.md): Retrieve SendingEvents sorted by ascending startDate. By default, the response contains the 100 (maxItems property) first items. To retrieve the next items matching the request, use the query parameter 'after' with the ID of the last item

### Re-send a Completed SendingEvent

 - [POST /sending-events/{id}/resend](https://doc.dev.connect.easypost.eu/public-api-production/openapi/sendingevents/sendingeventscontroller_resend.md): Creates a new Sending Event from an existing one in a final state (success or failure). All tasks are re-executed using the original document. Not allowed on Sending Events that are themselves a re-send.

### Pre-signed URL to Download SendingEvent Files (ePod, Submission Report).

 - [GET /sending-events/{id}/files/{fileReference}/download-url](https://doc.dev.connect.easypost.eu/public-api-production/openapi/sendingevents/sendingeventscontroller_retrievedownloadurl.md): Retrieve Sending Event files (ePod, Submission report). The file download can be initiated with a GET request on the received URL.

## Workflows

Entity representing the sequence of one or multiple tasks, used to create Jobs.

### Retrieve Workflow Configuration Based on ID

 - [GET /workflows/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/workflows/workflowscontroller_findone.md): Retrieve Workflow Configuration based on ID

### Retrieve Workflow Configurations

 - [GET /workflows](https://doc.dev.connect.easypost.eu/public-api-production/openapi/workflows/workflowscontroller_findworkflows.md): Retrieve the Workflow Configurations. By default, the response contains the 100 (maxItems property) first items. To retrieve the next items matching the request, use the query parameter 'after' with the ID of the last item

## Peppol Incoming Documents

Entity representing an incoming Peppol document.

### Retrieve Incoming Peppol Documents with Sorting and Filters

 - [GET /peppol-incoming-documents](https://doc.dev.connect.easypost.eu/public-api-production/openapi/peppol-incoming-documents/peppolcontroller_retrieveincomingpeppoldocumentsforfilter.md): Retrieve Incoming Peppol Documents. Use the 'sortField' parameter to choose the ordering field: 'createdAt' (default) or 'lastModifiedAt', and the 'sortOrder' parameter to choose the direction: 'desc' (default) or 'asc'. The 'from' and 'until' filters apply to the same field selected by 'sortField'. By default, the response contains the 100 (maxItems property) first items. To retrieve the next items matching the request, use the query parameter 'after' with the ID of the last item.

### Retrieve Incoming Peppol Document Based on ID

 - [GET /peppol-incoming-documents/sender/{senderId}/document/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/peppol-incoming-documents/peppolcontroller_retrieveincomingpeppoldocument.md): Retrieve Incoming Peppol Document based on ID

### Retrieve Incoming Peppol Document Pre-Signed Download URL Based on ID

 - [GET /peppol-incoming-documents/sender/{senderId}/document/{id}/download-url](https://doc.dev.connect.easypost.eu/public-api-production/openapi/peppol-incoming-documents/peppolcontroller_retrievedownloadurl.md): Retrieve a pre-signed URL for downloading the Incoming Peppol Document identified by the given ID. It is valid for 10 minutes

## Companies

Entity representing a Company.

### Create a Company

 - [POST /companies](https://doc.dev.connect.easypost.eu/public-api-production/openapi/companies/companiescontroller_createcompany.md): Create a Company based on the provided details.

### Retrieve All Managed Companies

 - [GET /companies](https://doc.dev.connect.easypost.eu/public-api-production/openapi/companies/companiescontroller_findall.md): Retrieve all managed companies.

### Retrieve a Company Based on ID

 - [GET /companies/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/companies/companiescontroller_findcompanybyid.md): Retrieve a Company based on ID

### Update a Company Based on ID

 - [PATCH /companies/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/companies/companiescontroller_updatecompany.md): Update a Company based on ID. It returns the updated Company.

## Departments

Entity representing a Department within a Company.

### Create a Department

 - [POST /departments](https://doc.dev.connect.easypost.eu/public-api-production/openapi/departments/departmentscontroller_createdepartment.md): Create a Department based on the provided details.

### Retrieve All Managed Departments

 - [GET /departments](https://doc.dev.connect.easypost.eu/public-api-production/openapi/departments/departmentscontroller_findall.md): Retrieve all managed departments.

### Update a Department Based on ID

 - [PATCH /departments/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/departments/departmentscontroller_updatedepartment.md): Update a Department based on ID. It returns the updated Department.

### Retrieve a Department Based on ID

 - [GET /departments/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/departments/departmentscontroller_finddepartmentbyid.md): Retrieve a Department based on ID

## Users

Entity representing a User within a Company.

### Create a User

 - [POST /users](https://doc.dev.connect.easypost.eu/public-api-production/openapi/users/userscontroller_createuser.md): Create a User based on the provided details.

### Retrieve All Managed Users

 - [GET /users](https://doc.dev.connect.easypost.eu/public-api-production/openapi/users/userscontroller_findall.md): Retrieve all managed users.

### Update a User Based on ID

 - [PATCH /users/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/users/userscontroller_updateuser.md): Update a User based on ID. It returns the updated User.

### Retrieve a User Based on ID

 - [GET /users/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/users/userscontroller_finduserbyid.md): Retrieve a User based on ID

## Usage

Entity representing usage data within a Company.

### Retrieve Usage Data for a Specific Company

 - [GET /usage](https://doc.dev.connect.easypost.eu/public-api-production/openapi/usage/usagecontroller_getusage.md): Retrieve usage data for a specific company with filters.

### Retrieve Detailed Usage Events for a Specific Company

 - [GET /usage/details](https://doc.dev.connect.easypost.eu/public-api-production/openapi/usage/usagecontroller_getusagedetails.md): Retrieve detailed usage events for a specific company with filters.

## App

### AppController_getHealthStatus

 - [GET /health](https://doc.dev.connect.easypost.eu/public-api-production/openapi/app/appcontroller_gethealthstatus.md)

## Webhook subscriptions

### Create a Webhook Subscription

 - [POST /webhooks](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_createwebhooksubscription.md): Create a webhook subscription for a given company.

### Retrieve All Webhook Subscriptions

 - [GET /webhooks](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_findwebhooksubscriptions.md): Retrieve all webhook subscriptions for a given company.

### Retrieve a Webhook Subscription

 - [GET /webhooks/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_findwebhookbyid.md): Retrieve a webhook subscription by ID.

### Update a Webhook Subscription

 - [PATCH /webhooks/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_updatewebhook.md): Update a webhook subscription by ID.

### Delete a Webhook Subscription

 - [DELETE /webhooks/{id}](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_deletewebhook.md): Delete a webhook subscription by ID.

### Reset a Webhook Secret

 - [POST /webhooks/{id}/reset-secret](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_resetwebhooksecret.md): Reset the secret for a webhook subscription by ID and return the new secret once.

### Test a Webhook Subscription

 - [POST /webhooks/{id}/test](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-subscriptions/webhookscontroller_testwebhook.md): Sends a test event matching one of the subscribed event types to the subscription URL and returns the HTTP response status. When the subscription has more than one event type, eventType must be provided.

## Webhook Events

### Job Status Changed

 - [POST job.status.changed](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-events/jobstatuschangedwebhook.md): Sent when a job status changes.

### Sending Event Status Changed

 - [POST sending.event.status.changed](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-events/sendingeventstatuschangedwebhook.md): Sent when a sending event business status changes.

### Sending Event File Ready

 - [POST sending.event.file.ready](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-events/sendingeventfilereadywebhook.md): Sent when a generated sending event file is ready for download.

### Peppol Document Received

 - [POST peppol.document.received](https://doc.dev.connect.easypost.eu/public-api-production/openapi/webhook-events/peppoldocumentreceivedwebhook.md): Sent when an incoming Peppol document is received.

