### Webhook Request Example Source: https://apidocs.parasut.com/index This example demonstrates the structure of a request sent to a registered Webhook URL. It includes event details and a `Signature` header generated using SHA256 hashing of the event data and an encryption key. ```json Content-Type: www-url-encoded body: { "company_id": "1", "resource": "sales_invoice", "action": "update", "event_date": "2023-01-02T01:01:00.000Z", "data": { "id": 1, "company_id": "1", "created_at": "2023-01-01T01:01:00.000Z", "updated_at": "2023-01-01T01:02:00.000Z", "operated_by_type": null, "operated_by_id": null, "included": [ ... ], # array of related objects "data": { ... } # unparsed (ayrıştırılmamış), string halinde object modal. İlgili modeli dönen API ile aynı formatta # data bu örnekte sales invoice, ilgili API: /#operation/showSalesInvoice } } ``` -------------------------------- ### Webhook Request Example Source: https://apidocs.parasut.com/swagger An example of a request sent to a registered Webhook URL. It includes the signature header generated using SHA256 hashing of event data and an encryption key. ```json { "company_id": "1", "resource": "sales_invoice", "action": "update", "event_date": "2023-01-02T01:01:00.000Z", "data": { "id": 1, "company_id": "1", "created_at": "2023-01-01T01:01:00.000Z", "updated_at": "2023-01-01T01:02:00.000Z", "operated_by_type": null, "operated_by_id": null, "included": [ ... ], "data": { ... } } } ``` -------------------------------- ### Get Email Status of Sales Offer (Conceptual) Source: https://apidocs.parasut.com/index This section describes how to retrieve the email status of a sales offer. It involves making a GET request to the offer, then parsing the 'included' section of the response to find the 'sharings' object and its 'email_status'. ```text 1. Make a GET request to the specific sales offer. 2. Locate the 'sharings' object within the 'included' array of the response. 3. Access the 'attributes' of the 'sharings' object. 4. The 'email_status' field within 'attributes' provides the email status. ``` -------------------------------- ### Get User Information Source: https://apidocs.parasut.com/index Retrieve general information about the authenticated user. ```APIDOC ## GET /me ### Description Get the general information of the user for whom the access token was obtained. ### Method GET ### Endpoint /me ### Parameters #### Query Parameters - **access_token** (string) - Required - The access token obtained via OAuth 2.0. ### Response #### Success Response (200) - **id** (integer) - The user's ID. - **name** (string) - The user's name. - **email** (string) - The user's email address. #### Response Example ```json { "id": 12345, "name": "John Doe", "email": "john.doe@example.com" } ``` ``` -------------------------------- ### Sales Invoice Response Structure (JSON) Source: https://apidocs.parasut.com/index Example JSON structure for a successful response when retrieving sales invoices. It includes data, included related resources, and metadata. ```json { "data": [ { "id": "string", "type": "sales_invoices", "attributes": { "archived": true, "invoice_no": "string", "net_total": 0, "gross_total": 0, "withholding": 0, "total_excise_duty": 0, "total_communications_tax": 0, "total_vat": 0, "total_vat_withholding": 0, "total_discount": 0, "total_invoice_discount": 0, "before_taxes_total": 0, "remaining": 0, "remaining_in_trl": 0, "payment_status": "paid", "created_at": "2026-02-12", "updated_at": "2026-02-12", "item_type": "invoice", "description": "string", "issue_date": "2026-02-12", "due_date": "2026-02-12", "invoice_series": "string", "invoice_id": 0, "currency": "TRL", "exchange_rate": 0, "withholding_rate": 0, "invoice_discount_type": "percentage", "invoice_discount": 0, "billing_address": "string", "billing_postal_code": "string", "billing_phone": "string", "billing_fax": "string", "tax_office": "string", "tax_number": "string", "country": "string", "city": "string", "district": "string", "is_abroad": true, "order_no": "string", "order_date": "2026-02-12", "shipment_addres": "string", "shipment_included": true, "cash_sale": true, "payer_tax_numbers": [ "string" ], "invoice_note": "string", "append_contact_balance": true, "e_document_accounts": [ null ] }, "relationships": { "category": { "data": { "id": "string", "type": "item_categories" } }, "contact": { "data": { "id": "string", "type": "contacts" } }, "details": { "data": [ { "id": "string", "type": "sales_invoice_details" } ] }, "payments": { "data": [ { "id": "string", "type": "payments" } ] }, "tags": { "data": [ { "id": "string", "type": "tags" } ] }, "sales_offer": { "data": { "id": "string", "type": "sales_offers" } }, "sharings": { "data": [ { "id": "string", "type": "sharings" } ] }, "recurrence_plan": { "data": { "id": "string", "type": "recurrence_plans" } }, "active_e_document": { "data": { "id": "string", "type": "e_archives" } } } } ], "included": [ { "id": "string", "type": "item_categories", "attributes": {}, "relationships": {} } ], "meta": { "current_page": 0, "total_pages": 0, "total_count": 0 } } ``` -------------------------------- ### Shipment Document Creation Source: https://apidocs.parasut.com/swagger Guides users on creating shipment documents (irsaliye) by first obtaining the necessary contact and product IDs, then using the createShipmentDocument endpoint. ```APIDOC ## POST /shipment-documents ### Description Creates a shipment document (irsaliye) using a specified customer/supplier ID and one or more product IDs. ### Method POST ### Endpoint /shipment-documents ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **data** (object) - Required - The main data object for the shipment document. - **type** (string) - Required - Must be "shipment_documents". - **relationships** (object) - Required - Relationships to other entities. - **contact** (object) - Required - Information about the contact (customer/supplier). - **data** (object) - Required - Contact data. - **id** (string) - Required - The ID of the contact. - **type** (string) - Required - Must be "contacts". - **stock_movements** (array) - Required - An array representing the shipment items. - Each object in the array should contain product information: - **product** (object) - Required - Information about the product. - **id** (string) - Required - The ID of the product. - **quantity** (number) - Required - The quantity of the product. - **unit_price** (number) - Optional - The unit price of the product. ### Obtaining Contact and Product IDs **Contact/Supplier ID:** - **Create New:** Use the [Create Contact](/#operation/createContact) endpoint. - **Existing:** Use the [List Contacts](/#operation/listContacts) endpoint with filters (name, email, tax number) to find the ID. **Product ID:** - **Create New:** Use the [Create Product](/#operation/createProduct) endpoint. - **Existing:** Use the [List Products](/#operation/listProducts) endpoint with filters (name, code) to find the ID. ### Request Example ```json { "data": { "type": "shipment_documents", "relationships": { "contact": { "data": { "id": "contact_id_xyz", "type": "contacts" } }, "stock_movements": [ { "product": { "id": "product_id_abc" }, "quantity": 5, "unit_price": 25.00 }, { "product": { "id": "product_id_def" }, "quantity": 10, "unit_price": 10.00 } ] } } } ``` ### Response #### Success Response (201 Created) - **data** (object) - The created shipment document object. - **id** (string) - The ID of the created shipment document. - **type** (string) - The type of the resource (e.g., "shipment_documents"). - **attributes** (object) - Attributes of the created shipment document. - **relationships** (object) - Relationships of the created shipment document. #### Response Example ```json { "data": { "id": "shipment_doc_id_789", "type": "shipment_documents", "attributes": { "document_number": "SHP-001", "status": "created", "created_at": "2023-10-27T10:00:00Z" }, "relationships": { "contact": { "data": { "id": "contact_id_xyz", "type": "contacts" } } } } } ``` ``` -------------------------------- ### Sales Invoice Create Request Body (JSON) Source: https://apidocs.parasut.com/index Example JSON structure for the request body when creating a sales invoice. Includes required 'data' object with 'type', 'attributes', and 'relationships'. ```json { "data": { "id": "string", "type": "sales_invoices", "attributes": {}, "relationships": {} } } ``` -------------------------------- ### Invoice Creation Structure Source: https://apidocs.parasut.com/index Illustrates the JSON structure for creating an invoice (irsaliye), emphasizing the 'contact' ID for the customer/supplier and the 'stock_movements' array for invoice items, each linked to a product ID. ```json { "relationships": { "contact": { "id": "customer_or_supplier_id" }, "stock_movements": [ { "relationships": { "product": { "id": "product_id" } } } ] } } ``` -------------------------------- ### General API Usage Source: https://apidocs.parasut.com/index This section outlines general guidelines for interacting with the Parasut API, including base URL, content types, and rate limiting. ```APIDOC ## General API Usage ### Base URL The base URL for API requests is `https://api.parasut.com/v4/firma_no`. - `firma_no` is the unique identifier for the company in the Parasut database. - Example: To access the contacts of company number 115, use `https://api.parasut.com/v4/115/contacts`. ### Content Type Requests must include the `Content-Type` header set to either `application/json` or `application/vnd.api+json`. ### Creating New Records When creating a new record, the `ID` parameter of the related record should be left empty or omitted. However, the `ID` of the parent record (e.g., `relationships->contact->data->id` for a sales invoice) must be provided if it already exists. ### Webhook Signature For webhook requests, the `Signature` header is generated by hashing the `event data` and your assigned `encryption key` using SHA256. ### Rate Limiting Users are limited to 10 requests per 10 seconds. ``` -------------------------------- ### List Offers (Teklif Index) Source: https://apidocs.parasut.com/index Retrieves a list of offers with various filtering and sorting options. ```APIDOC ## List Offers (Teklif Index) ### Description This endpoint retrieves a list of offers (teklif) with options to filter by archived status, query string, invoice status, general status, sort the results, and paginate through the data. It also supports including related data like contact and sales invoice information. ### Method GET ### Endpoint /offers ### Parameters #### Path Parameters - **company_id** (integer) - Required - The ID of the company. #### Query Parameters - **filter[archived]** (boolean) - Optional - Filter offers by their archived status. - **filter[query]** (string) - Optional - Filter offers by a general query string. - **filter[invoice_status]** (string) - Optional - Filter offers by their invoice status. - **filter[status]** (string) - Optional - Filter offers by their general status. - **sort** (string) - Optional - Sort the offers. Available parameters: `id`, `issue_date`, `description`, `net_total_in_trl`, `sales_invoice_id`. - **page[number]** (integer) - Optional - Specifies the page number for pagination. Defaults to 1. - **include** (string) - Optional - Specifies related data to include in the response. Available options: `contact`, `sales_invoice`. ### Response #### Success Response (200) - **data** (array) - A list of offer objects. - Each offer object contains details like `id`, `issue_date`, `description`, `net_total_in_trl`, etc. - **links** (object) - Pagination links. - **meta** (object) - Metadata about the response, including pagination information. #### Response Example ```json { "data": [ { "id": 1, "issue_date": "2023-10-27", "description": "Offer for Project X", "net_total_in_trl": 1500.00, "sales_invoice_id": null } ], "links": { "self": "/offers?page[number]=1" }, "meta": { "current_page": 1, "total_pages": 10 } } ``` ``` -------------------------------- ### Other - Trackable Job API Source: https://apidocs.parasut.com/index Endpoint to get information about trackable jobs. ```APIDOC ## Other - Trackable Job API ### Description Get information about trackable jobs. ### Method GET ### Endpoint /v4/trackable_jobs/{id} ### Description Retrieves information about a specific trackable job. ``` -------------------------------- ### POST /sales_offers_pdfs Source: https://apidocs.parasut.com/swagger Generates a PDF for sales offers. ```APIDOC ## POST /sales_offers_pdfs ### Description Generates a PDF for sales offers. This endpoint initiates the PDF generation process and returns a reference to the generated PDF. ### Method POST ### Endpoint /sales_offers_pdfs ### Parameters #### Request Body - **data** (object) - Required - The payload for generating the sales offer PDF. - **type** (string) - Required - Must be "sales_offers_pdfs". - **attributes** (object) - Required - The attributes for the sales offer PDF. - **id** (string) - Required - The ID of the sales offer for which to generate the PDF. - **item_type** (string) - Required - The type of item associated with the sales offer. - **issue_date** (string) - Required - The issue date of the sales offer (YYYY-MM-DD). - **is_abroad** (boolean) - Optional - Alıcı yurt dışı bilgisi. - **order_no** (string) - Optional - Sipariş no. ### Request Example ```json { "data": { "type": "sales_offers_pdfs", "attributes": { "id": "so_xyz789", "item_type": "product", "issue_date": "2023-10-27", "is_abroad": false, "order_no": "ORD-9876" } } } ``` ### Response #### Success Response (202 Accepted) - **data** (object) - The representation of the generated sales offer PDF. - **id** (string) - The ID of the sales offer PDF resource. - **type** (string) - The type of the resource, "sales_offers_pdfs". - **attributes** (object) - The attributes of the sales offer PDF. - **url** (string) - The URL to access the generated PDF. This will be available once the generation is complete. - **created_at** (string) - The timestamp when the PDF generation was initiated (ISO 8601 format). - **status** (string) - The current status of the PDF generation (e.g., "pending", "processing", "completed", "failed"). - **errors** (array) - An array of strings, if any errors occurred during generation. - **result** (string) - A summary of the generation result. - **statistics** (string) - Statistical information about the generation process. #### Response Example ```json { "data": { "id": "pdf_gen_123", "type": "sales_offers_pdfs", "attributes": { "url": null, "created_at": "2023-10-27T12:00:00Z", "status": "pending", "errors": [], "result": null, "statistics": null } } } ``` ``` -------------------------------- ### Authentication API Source: https://apidocs.parasut.com/index This section covers authentication, specifically how to obtain an access token to interact with the API. ```APIDOC ## Authentication ### Description Obtain an access token to authenticate your API requests. ### Method POST ### Endpoint /oauth/token ### Parameters #### Request Body - **grant_type** (string) - Required - Typically 'password' or 'refresh_token' - **username** (string) - Required (if grant_type is 'password') - Your Paraşüt username - **password** (string) - Required (if grant_type is 'password') - Your Paraşüt password - **refresh_token** (string) - Required (if grant_type is 'refresh_token') - Your refresh token ### Request Example ```json { "grant_type": "password", "username": "your_email@example.com", "password": "your_password" } ``` ### Response #### Success Response (200) - **access_token** (string) - The token for accessing protected resources. - **token_type** (string) - The type of token (e.g., 'Bearer'). - **expires_in** (integer) - The token's expiration time in seconds. - **refresh_token** (string) - A token to obtain a new access token without re-authenticating. #### Response Example ```json { "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "def12345... } ``` ``` -------------------------------- ### Other - API Home API Source: https://apidocs.parasut.com/index Endpoint to get information about the API home. ```APIDOC ## Other - API Home API ### Description Get information about the API home page. ### Method GET ### Endpoint /v4/home ### Description Retrieves information about the API home. ``` -------------------------------- ### GET /shipment_documents/{id} Source: https://apidocs.parasut.com/swagger Retrieves a specific shipment document by its ID. ```APIDOC ## GET /shipment_documents/{id} ### Description Retrieves a specific shipment document by its ID. ### Method GET ### Endpoint /shipment_documents/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the shipment document. ### Response #### Success Response (200 OK) - **data** (object) - The shipment document object. - Contains `id`, `type`, and `attributes`. #### Response Example ```json { "data": { "id": "shp_abc123", "type": "shipment_documents", "attributes": { "archived": false, "invoice_no": null, "print_note": null, "printed_at": null, "created_at": "2023-10-27", "updated_at": "2023-10-27", "inflow": true, "description": "Sample shipment", "city": "Istanbul", "district": "Kadıköy", "address": "123 Main St", "issue_date": "2023-10-27", "shipment_date": "2023-10-27T10:00:00Z", "procurement_number": "INV-12345" } } } ``` ``` -------------------------------- ### Sales Offer Status Update Response Sample (200 OK) (JSON) Source: https://apidocs.parasut.com/index This JSON object details the successful response when a sales offer's status is updated. It includes comprehensive details about the sales offer, its attributes, and related entities like activities. ```json { "data": { "id": "string", "type": "sales_offers", "attributes": { "content": "string", "contact_type": "string", "sharings_count": 0, "status": "string", "display_exchange_rate_in_pdf": true, "archived": true, "net_total": 0, "gross_total": 0, "withholding": 0, "total_excise_duty": 0, "total_communications_tax": 0, "total_accommodation_tax": 0, "total_vat": 0, "total_vat_withholding": 0, "vat_withholding": 0, "total_discount": 0, "total_invoice_discount": 0, "description": "string", "issue_date": "2026-02-12", "due_date": "2026-02-12", "currency": "TRL", "exchange_rate": 0, "withholding_rate": 0, "invoice_discount_type": "percentage", "invoice_discount": 0, "billing_address": "string", "billing_phone": "string", "billing_fax": "string", "tax_office": "string", "tax_number": "string", "city": "string", "district": "string", "is_abroad": true, "order_no": "string", "order_date": "2026-02-12" }, "relationships": { "activities": { "data": [ { "id": "string", "type": "activities" } ] } } }, "included": [ { "id": "string", "type": "activities", "attributes": {}, "relationships": {} } ] } ``` -------------------------------- ### GET /shipment_documents Source: https://apidocs.parasut.com/swagger Retrieves a list of shipment documents, with optional filtering and sorting. ```APIDOC ## GET /shipment_documents ### Description Retrieves a list of shipment documents, with optional filtering and sorting. ### Method GET ### Endpoint /shipment_documents ### Parameters #### Query Parameters - **filter[issue_date]** (string) - Optional - Filter by issue date (YYYY-MM-DD). - **filter[procurement_number]** (string) - Optional - Filter by procurement number. - **sort** (string) - Optional - Sort order (e.g., `issue_date`, `-issue_date`). ### Response #### Success Response (200 OK) - **data** (array) - An array of shipment document objects. - Each object contains `id`, `type`, and `attributes`. #### Response Example ```json { "data": [ { "id": "shp_abc123", "type": "shipment_documents", "attributes": { "archived": false, "invoice_no": null, "print_note": null, "printed_at": null, "created_at": "2023-10-27", "updated_at": "2023-10-27", "inflow": true, "description": "Sample shipment", "city": "Istanbul", "district": "Kadıköy", "address": "123 Main St", "issue_date": "2023-10-27", "shipment_date": "2023-10-27T10:00:00Z", "procurement_number": "INV-12345" } } ] } ``` ``` -------------------------------- ### GET /sales_invoices/{id} Source: https://apidocs.parasut.com/swagger Retrieves the details of a specific sales invoice by its ID. ```APIDOC ## GET /sales_invoices/{id} ### Description Retrieves the details of a specific sales invoice. ### Method GET ### Endpoint /sales_invoices/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the sales invoice. ### Response #### Success Response (200 OK) - **id** (string) - The unique identifier of the sales invoice. - **type** (string) - The type of the resource (e.g., "sales_invoices"). - **attributes** (object) - The detailed attributes of the sales invoice. - **net_total** (number) - Ürün/hizmet net tutarı - **vat_withholding** (number) - Tevkifat - **created_at** (string) - Kayıt tarihi - **updated_at** (string) - Son güncelleme tarihi - **quantity** (number) - Miktar - **unit_price** (number) - Birim fiyatı - **vat_rate** (number) - KDV oranı - **vat_withholding_rate** (number) - Tevkifat oranı - **discount_type** (string) - İndirim türü - **discount_value** (number) - Discount value. - **excise_duty_type** (string) - ÖTV tipi - **excise_duty_value** (number) - Excise duty value. - **communications_tax_rate** (number) - ÖİV oranı - **description** (string) - Açıklama - **delivery_method** (string) - Teslim Şartı - **shipping_method** (string) - Gönderim Şekli #### Response Example ```json { "id": "inv_12345", "type": "sales_invoices", "attributes": { "net_total": 1005.00, "vat_withholding": 0.00, "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z", "quantity": 10, "unit_price": 100.50, "vat_rate": 0.20, "vat_withholding_rate": 0.00, "discount_type": null, "discount_value": 0.00, "excise_duty_type": null, "excise_duty_value": 0.00, "communications_tax_rate": 0.00, "description": "Sample sales invoice item", "delivery_method": null, "shipping_method": null } } ``` ``` -------------------------------- ### Create Sales Invoice from Offer API Source: https://apidocs.parasut.com/index This section outlines the process of generating a sales invoice based on an existing offer. It involves retrieving offer details and then creating a sales invoice using a POST request. ```APIDOC ## Create Sales Invoice from Offer Follow these steps to create a sales invoice from an existing offer: ### 1. Retrieve Offer Details Send a GET request to the offer endpoint for which you want to create a sales invoice. ### 2. Create Sales Invoice Populate the necessary fields and send a POST request to the sales invoice endpoint. **Key Considerations:** - Many fields are similar between offers and sales invoices; data from the offer response can often be directly used in the sales invoice POST request. - The offer response's `included` array contains objects of types 'contacts', 'sales_offer_details', and 'products'. These can be mapped to the `relationships` field in the sales invoice POST request data. - In the sales invoice POST request, under `data > relationships > sales_offer > data`, set the `id` field to the offer's ID and the `type` field to the string value "sales_offers". ``` -------------------------------- ### GET /{company_id}/shipment_documents/{id} Source: https://apidocs.parasut.com/swagger Retrieves a specific shipment document by its ID. ```APIDOC ## GET /{company_id}/shipment_documents/{id} ### Description Retrieves a specific shipment document by its ID. ### Method GET ### Endpoint `/{company_id}/shipment_documents/{id}` ### Parameters #### Path Parameters - **company_id** (integer) - Required - The ID of the company. - **id** (integer) - Required - The ID of the shipment document. #### Query Parameters - **include** (string) - Optional - Comma-separated list of related resources to include in the response. Available: `contact`, `stock_movements`, `stock_movements.product`, `tags`, `invoices`. ### Request Example ```json { "example": "No request body for GET request." } ``` ### Response #### Success Response (200) - **data** (object) - The requested shipment document. - **id** (string) - The ID of the shipment document. - **type** (string) - The type of the resource, 'shipment_documents'. - **attributes** (object) - The attributes of the shipment document. - **relationships** (object) - The relationships of the shipment document. #### Response Example ```json { "data": { "id": "123", "type": "shipment_documents", "attributes": { "description": "Example Shipment", "document_date": "2023-10-27T10:00:00Z", "due_date": "2023-11-27T10:00:00Z", "invoice_number": "INV-001", "status": "draft", "net_total": 100.00, "tax_total": 20.00, "gross_total": 120.00, "currency": "USD", "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" }, "relationships": { "contact": { "data": { "type": "contacts", "id": "1" } }, "invoice": { "data": { "type": "sales_invoices", "id": "1" } } } } } ``` #### Error Response (400, 401, 403, 404, 422) - **errors** (array) - An array of error objects. - **id** (string) - The error ID. - **status** (string) - The HTTP status code. - **code** (string) - The error code. - **title** (string) - The error title. - **detail** (string) - The error detail. - **source** (object) - The source of the error. - **pointer** (string) - The JSON pointer to the error source. - **parameter** (string) - The parameter that caused the error. - **meta** (object) - Additional metadata about the error. ``` -------------------------------- ### Inventory - Product API Source: https://apidocs.parasut.com/index Endpoints for managing products in inventory. ```APIDOC ## Inventory - Product API ### Description Manage products within your inventory. ### Method GET ### Endpoint /v4/products ### Description Retrieves a list of all products. ### Method POST ### Endpoint /v4/products ### Description Creates a new product. ### Method GET ### Endpoint /v4/products/{id} ### Description Retrieves a specific product by its ID. ### Method PUT ### Endpoint /v4/products/{id} ### Description Updates an existing product. ### Method DELETE ### Endpoint /v4/products/{id} ### Description Deletes a product. ``` -------------------------------- ### Create Shipment (İrsaliye Oluşturma) Source: https://apidocs.parasut.com/index Endpoint for creating a shipment (İrsaliye) by referencing existing contact and product IDs. ```APIDOC ## Create Shipment (İrsaliye Oluşturma) ### Description This endpoint allows you to create a shipment (İrsaliye) by providing the ID of a contact (customer/supplier) and one or more product IDs. ### Method POST ### Endpoint /shipments ### Parameters #### Request Body - **relationships** (object) - Required - Contains relationship information for the shipment. - **contact** (object) - Required - Information about the contact. - **id** (integer) - Required - The ID of the customer or supplier. - **stock_movements** (array) - Required - A list representing the items in the shipment. - **product** (object) - Required - Information about the product. - **id** (integer) - Required - The ID of the product. ### Request Example ```json { "relationships": { "contact": { "id": 101 }, "stock_movements": [ { "product": { "id": 201 } }, { "product": { "id": 202 } } ] } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **shipment_id** (integer) - The ID of the created shipment. #### Response Example ```json { "status": "success", "shipment_id": 98765 } ``` ``` -------------------------------- ### GET /sales-invoices Source: https://apidocs.parasut.com/swagger Retrieves a list of sales invoices. Supports filtering by type. ```APIDOC ## GET /sales-invoices ### Description Retrieves a list of sales invoices. Supports filtering by type. ### Method GET ### Endpoint /sales-invoices ### Query Parameters - **type** (string) - Optional - Filters the sales invoices by their type. Allowed values: "item_categories", "contacts", "sales_invoice_details", "payments", "tags", "sales_offers", "sharings", "recurrence_plans", "e_archives", "e_invoices". ### Success Response (200) - **data** (array) - An array of sales invoice objects. - **id** (string) - The unique identifier for the sales invoice. - **type** (string) - The type of the resource. - **attributes** (object) - The attributes of the sales invoice. - **relationships** (object) - The relationships of the sales invoice. ### Response Example { "data": [ { "id": "inv_123", "type": "sales_invoice_details", "attributes": {}, "relationships": {} } ] } ``` -------------------------------- ### GET /transactions Source: https://apidocs.parasut.com/swagger Retrieves a list of transactions. Supports filtering and inclusion of related resources. ```APIDOC ## GET /transactions ### Description Retrieves a list of transactions. Supports filtering and inclusion of related resources. ### Method GET ### Endpoint /transactions ### Parameters #### Query Parameters - **include** (string) - Optional - Response ile birlikte geri dönmesini istediğiniz ilişkiler - *Available: debit_account, credit_account, payments* ### Request Example ```json { "example": "No request body for GET request" } ``` ### Response #### Success Response (200) - **data** (object) - The transaction object. - **included** (array) - An array of included resources (e.g., debit_account, credit_account, payments). - **id** (string) - The ID of the included resource. - **type** (string) - The type of the included resource (e.g., "accounts", "payments"). - **attributes** (object) - The attributes of the included resource. - **relationships** (object) - The relationships of the included resource. #### Response Example ```json { "example": { "data": { "$ref": "#/definitions/Transaction" }, "included": [ { "id": "string", "type": "accounts", "attributes": {}, "relationships": {} } ] } } ``` #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **403**: Forbidden - **404**: Not Found - **422**: Unprocessable Entity ``` -------------------------------- ### Settings - Tag API Source: https://apidocs.parasut.com/index Endpoints for managing tags. ```APIDOC ## Settings - Tag API ### Description Manage tags for various items. ### Method GET ### Endpoint /v4/tags ### Description Retrieves a list of all tags. ### Method POST ### Endpoint /v4/tags ### Description Creates a new tag. ### Method GET ### Endpoint /v4/tags/{id} ### Description Retrieves a specific tag by its ID. ### Method PUT ### Endpoint /v4/tags/{id} ### Description Updates an existing tag. ### Method DELETE ### Endpoint /v4/tags/{id} ### Description Deletes a tag. ``` -------------------------------- ### GET /{company_id}/e_invoices/{id} Source: https://apidocs.parasut.com/swagger Retrieves the details of a specific e-invoice for a given company. ```APIDOC ## GET /{company_id}/e_invoices/{id} ### Description Retrieves the details of a specific e-invoice for a given company. ### Method GET ### Endpoint `/{company_id}/e_invoices/{id}` ### Parameters #### Path Parameters - **company_id** (integer) - Required - Firma ID - **id** (integer) - Required - EInvoice ID #### Query Parameters - **include** (string) - Optional - Response ile birlikte geri dönmesini istediğiniz ilişkiler - *Available: invoice* ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **data** (object) - The e-invoice data. - **included** (array) - Included related resources. - **id** (string) - The ID of the included resource. - **type** (string) - The type of the resource (e.g., "sales_invoices", "purchase_bills"). - **attributes** (object) - Attributes of the included resource. - **relationships** (object) - Relationships of the included resource. #### Response Example ```json { "data": { ... }, "included": [ { "id": "string", "type": "sales_invoices", "attributes": { ... }, "relationships": { ... } } ] } ``` #### Error Responses - **400** (object) - Bad Request - **401** (object) - Unauthorized - **403** (object) - Forbidden - **404** (object) - Not Found - **422** (object) - Unprocessable Entity Each error response contains an `errors` array, where each item is an `Error` object (refer to `#/definitions/Error`). ``` -------------------------------- ### Requesting Access Token with Authorization Code Source: https://apidocs.parasut.com/index This `curl` command demonstrates how to request an access token using the `authorization_code` grant type. It requires `CLIENT_ID`, `CLIENT_SECRET`, the `RETURNED_CODE` obtained from the authorization step, and the `REDIRECT_URL`. ```bash curl -F grant_type=authorization_code \ -F client_id=CLIENT_ID \ -F client_secret=CLIENT_SECRET \ -F code=RETURNED_CODE \ -F redirect_uri=REDIRECT_URL \ -X POST BASE_URL/oauth/token ``` -------------------------------- ### Get Sales Invoice Details with Payments and Transactions Source: https://apidocs.parasut.com/index Retrieve sales invoice details, including associated payments and their transactions. ```APIDOC ## GET /invoices/sales/{id} ### Description Get sales invoice details, including payments and their transactions. ### Method GET ### Endpoint /invoices/sales/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - The ID of the sales invoice. #### Query Parameters - **include** (string) - Optional - Specifies related data to include. Use 'payments' to include payments, and 'payments.transaction' to include payments and their transactions. ### Response #### Success Response (200) - **data** (object) - The sales invoice details. - **included** (array) - An array of included related data (payments and transactions). #### Response Example ```json { "data": { "type": "invoices", "id": 5001, "attributes": { "...", "total_price": 100.50 }, "relationships": { "payments": { "data": [ { "type": "payments", "id": 6001 } ] } } }, "included": [ { "type": "payments", "id": 6001, "attributes": { "paid_at": "2023-10-27", "amount": 100.50 }, "relationships": { "transaction": { "data": { "type": "transactions", "id": 7001 } } } }, { "type": "transactions", "id": 7001, "attributes": { "..." } } ] } ``` ``` -------------------------------- ### Requesting Access Token with Password Grant Type Source: https://apidocs.parasut.com/index This `curl` command shows how to obtain an access token using the `password` grant type, which involves providing email and password credentials directly. Ensure you replace `YOUREMAIL` and `YOURPASSWORD` with your actual credentials. ```bash curl -F grant_type=password \ -F client_id=CLIENT_ID \ -F client_secret=CLIENT_SECRET \ -F username=YOUREMAIL \ -F password=YOURPASSWORD \ -F redirect_uri=urn:ietf:wg:oauth:2.0:oob \ -X POST BASE_URL/oauth/token ```