openapi: 3.2.0 info: title: Paperless Parts API v2 Processes API description: 'The Paperless Parts API provides access to your data, enabling developers to easily integrate Paperless Parts with third-party systems, such as Customer Relationship Management (CRM) and Enterprise Resource Planning (ERP) tools. The API is designed to support two primary use case. First, reading all information associated with a particular order or quote for import into another system. Second, managing customer data, either for an initial bulk import or for on-going synchronization with an external database. ## Authorization ## Requests are authorized via an API key. Administrators of a Paperless Parts account can generate an API Token which grants access to all of the endpoints documented here. The token obtained from the application must be added to the header of all requests using the key `\"Authorization\"` with the value `\"API-Token \"`, where `` is your Paperless Parts API Token. You can use the \"Execute\" button in an endpoint''s documentation on this page to try out the endpoint. This will send a request to the endpoint on the Paperless Parts server and display the result on this page. Before doing so, however, you''ll need to click on the ''Authorize'' button at the top of the screen, and in the \"Value\" field enter `\"API-Token \"`, where `` is your API token as described above. ## Overview ## The API endpoints are organized around REST. API calls should be made to the `https://api.paperlessparts.com` base domain. URLs are designed to clearly describe an entity or collection of entities. HTTP verbs typically describe whether entities are being read, created, modified, or deleted. Where applicable, request and response bodies are in JSON format. Standard HTTP response codes, in addition to error messages, are used to help explain request failures. ### Associations Many entities in the API data model are associated with other entities. As a guiding principle, `GET` requests that fetch data nest associated entities in the JSON response. However, when creating or modifying entities, a flat (non-nested) object must be provided, as explained in the documentation for each endpoint. Associations are specified when writing data by using entity IDs in fields ending in `_id`. For example, consider the relationship where a Company has many Customers. When fetching a Customer via a `GET` request, the associated Company will be nested as an object with key `company` in the response. When creating a Customer, the Company is specified via its integer id using the key `company_id`. ### Events Overview Events are a way of logging relevant actions that are taken within your account. For instance, when you create a new quote, Paperless Parts logs a `quote.created` event, and once you send that quote, we log another `quote.sent` event. These logs offer you a trail of data that you can use to keep integrations in sync. By polling for new events, you can maintain an up-to-date record of what actions Paperless Parts has initiated that your integration has not. For instance, you could poll for `part.interrogation_succeeded` events and send out a notification upon receiving one. ### HTTP Methods The API endpoints support different HTTP methods depending on whether records are being read, created, or updated. To read an entity, use `GET`. To create a new entity, use `POST`. To modifying an entity, use `PATCH`. Note, `PATCH` is used rather than `PUT` to indicate that entities can be partially updated. In other words, in general, if a field is omitted from a `PATCH` request, that field''s value will stay the same (rather than be set to `null`). All fields requiring values are required to be included in `POST` requests. > Note: Endpoints with a documented `PATCH` method can generally be used with a `PUT` method. The `PUT` is implemented as a partial update (as opposed to a replacement) and is supported for maximum compatibilty. For example, consider the `email` field on the Customer entity, which is required. All Customers must have a non-null `email`. When creating a Customer via `POST`, the request body must contain an `email` key and its value cannot be `null` (other validation applies to that field, as well, including a valid email format and a unique value). When editing a Customer via `PATCH` request, it is not necessary to include an `email` key in the request body. If `email` is omitted, the existing email address will not be changed. If you send a `PATCH` request with `email=null`, then you will receive an error response indicating that a value for `email` is required.' version: '2.0' termsOfService: https://www.paperlessparts.com/web-service-agreement/ contact: name: Paperless Parts url: https://www.paperlessparts.com email: support@paperlessparts.com servers: - url: '{url}/{version}' variables: url: default: https://api.paperlessparts.com version: default: v2 security: - app_id: [] tags: - name: Processes description: Endpoints for managing Processes, Operation Definitions, and Add on Definitions paths: /processes/public/processes: get: summary: Get a list of Processes. description: A complete list of Processes. operationId: ProcessesList tags: - Processes responses: 200: description: Successful response content: application/json: schema: type: array items: type: object properties: uuid: type: string example: 3ec5051e-9d2d-4ea4-b903-abd9b6aa3448 description: The Processes' uuid name: type: string example: CNC Machining description: The name of the Process external_name: type: string example: CNC Machining description: The external name of the Process 404: description: Not found response content: text/plain: schema: title: No Processes found type: string example: 'Error: Not Found' /processes/public/operation_definitions: get: summary: Get a list of Operation Defintions. description: A complete list of Operation Defintions. operationId: OperationDefintionList tags: - Processes responses: 200: description: Successful response content: application/json: schema: type: array items: type: object properties: uuid: type: string example: 3ec5051e-9d2d-4ea4-b903-abd9b6aa3448 description: The Operation Definition's uuid erp_code: type: - string - 'null' name: type: string example: Assemble description: The name of the Process is_outside_service: type: boolean metadata: $ref: '#/components/schemas/Metadata' 404: description: Not found response content: text/plain: schema: title: No Operation Definitions found type: string example: 'Error: Not Found' /processes/public/discount_definitions: get: summary: Get a list of Discount definitions. description: A complete list of Discount defintions. operationId: DiscountDefinitionList tags: - Processes responses: 200: description: Successful response content: application/json: schema: type: array items: type: object properties: uuid: type: string example: 44887c8d-6321-415d-b806-574a2e35afe3 description: The Discount definition's UUID name: type: string example: Good Customer Discount description: The name of the Discount definition 404: description: Not found response content: text/plain: schema: title: No Discount Definitions found type: string example: 'Error: Not Found' /processes/public/add_on_definitions: get: summary: Get a list of Add On Definitions description: A complete list of Add On Definitions. operationId: AddOnDefinitionList tags: - Processes responses: 200: description: Successful response content: application/json: schema: type: array items: type: object properties: id: type: integer example: 4 description: The Add On Defintion's id erp_code: type: - string - 'null' name: type: string example: Assemble description: The name of the Process 404: description: Not found response content: text/plain: schema: title: No Add On Definitions found type: string example: 'Error: Not Found' /processes/public/materials: get: summary: Get a list of Materials description: Returns a list of supplier materials. The materials are returned 20 results at a time and can be iterated over by using the page parameter. operationId: ListMaterials parameters: - in: query name: search schema: type: string required: false description: Value used to search against the material name - in: query name: page schema: type: string required: false description: The page of results to return. - in: query name: material_family schema: type: string required: false description: The material family name. - in: query name: material_class schema: type: string required: false description: The material class name. - in: query name: material_name schema: type: string required: false description: The material name. tags: - Processes responses: 200: description: Successful response content: application/json: schema: type: object properties: count: type: integer description: The total number of records matching the supplied query parameters next: type: - string - 'null' description: The URL of the next page of results. Null if this is the last page previous: type: - string - 'null' description: The URL of the previous page of results. Null if this is the first page results: type: array items: type: object properties: uuid: type: string example: 3ec5051e-9d2d-4ea4-b903-abd9b6aa3448 description: The Material's uuid name: type: string example: Aluminum 6061 description: The name of the Material custom_name: type: - string - 'null' example: Aluminum 6061 description: The custom name of the material material_family: type: string example: Aluminum description: The Material's family material_class: type: string example: Metal description: The Material's Class 404: description: Not found response content: text/plain: schema: title: No Materials found type: string example: 'Error: Not Found' components: schemas: Metadata: type: object example: '{ crm_id: 1581 }' description: Object that can be used to attach key-value data to an object. Up to 25 keys can be speficied, with key names up to 40 characters long and values up to 500 characters long. securitySchemes: app_id: type: apiKey description: API key to authorize requests. name: Authorization in: header