From a079b3b77c720bf143277a33d3f3ff3172750b93 Mon Sep 17 00:00:00 2001 From: Burak Kara Date: Mon, 20 Feb 2023 16:38:52 +0300 Subject: [PATCH 1/4] wip --- spec/swagger.yaml | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/spec/swagger.yaml b/spec/swagger.yaml index 78055e4..0032af6 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -16831,6 +16831,26 @@ definitions: type: string readOnly: false description: Adres + postal_code: + type: string + readOnly: false + description: Posta kodu + company_city: + type: string + readOnly: false + description: Şirket ili + company_district: + type: string + readOnly: false + description: Şirket ilçesi + company_address: + type: string + readOnly: false + description: Şirket adresi + company_postal_code: + type: string + readOnly: false + description: Şirket posta kodu issue_date: type: string format: date @@ -16841,6 +16861,35 @@ definitions: format: date-time readOnly: false description: Fiili sevk tarihi + order_no: + type: string + readOnly: false + description: Sipariş numarası + order_date: + type: string + format: date + readOnly: false + description: Sipariş tarihi + carrier_legal_name: + type: string + readOnly: false + description: Kargo firması ismi + carrier_tax_number: + type: string + readOnly: false + description: Kargo firması vergi numarası + carrier_license_plate: + type: string + readOnly: false + description: Kargo firması araç plakası + trailer_license_plates: + type: string + readOnly: false + description: Kargo römork araç plakaları + drivers_info: + type: string + readOnly: false + description: Şöför bilgileri procurement_number: type: string readOnly: false From 4835ab3c6b2d697db6706f701c89df4df82258eb Mon Sep 17 00:00:00 2001 From: Burak Kara Date: Tue, 21 Feb 2023 17:40:27 +0300 Subject: [PATCH 2/4] add shipment document and e-despatch endpoints --- spec/swagger.yaml | 1808 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 1582 insertions(+), 226 deletions(-) diff --git a/spec/swagger.yaml b/spec/swagger.yaml index 0032af6..f3286dc 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -9,6 +9,21 @@ info: # CHANGE LOG + ### **2023-02-25** + + #### İrsaliye + + - İrsaliye üzerine `postal_code`, `company_city`, `company_district`, + `company_address`, `company_postal_code`, `order_no`, `order_date`, + `carrier_legal_name`, `carrier_tax_number`, `carrier_license_plate`, + `trailer_license_plates` ve `drivers_info` alanları eklendi. + + - İrsaliye için `download_e_documents`, `archive`, `unarchive`, `print`, + `update_print_info`, `mark_as_printed`, `link_invoices`, `unlink_invoices`, + `legalize`, `resend`, `pdf`, `ubl`, `e_despatch`, `preview`, `response_html` + ve `validate_e_despatch` endpointleri eklendi. + + ### **2023-02-20** #### Konaklama Vergisi @@ -10254,28 +10269,6 @@ paths: type: array items: $ref: '#/definitions/ShipmentDocument' - included: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - contacts - - tags - - stock_movements - - sales_invoices - - purchase_bills - attributes: - type: object - relationships: - type: object meta: $ref: '#/definitions/ListMeta' '400': @@ -10439,28 +10432,6 @@ paths: properties: data: $ref: '#/definitions/ShipmentDocument' - included: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - contacts - - tags - - stock_movements - - sales_invoices - - purchase_bills - attributes: - type: object - relationships: - type: object '400': description: Bad Request schema: @@ -10540,28 +10511,6 @@ paths: properties: data: $ref: '#/definitions/ShipmentDocument' - included: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - contacts - - tags - - stock_movements - - sales_invoices - - purchase_bills - attributes: - type: object - relationships: - type: object '400': description: Bad Request schema: @@ -10723,28 +10672,6 @@ paths: properties: data: $ref: '#/definitions/ShipmentDocument' - included: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - contacts - - tags - - stock_movements - - sales_invoices - - purchase_bills - attributes: - type: object - relationships: - type: object '400': description: Bad Request schema: @@ -10846,83 +10773,40 @@ paths: type: array items: $ref: '#/definitions/Error' - '/{company_id}/stock_movements': + '/{company_id}/shipment_documents/{id}/archive': parameters: - name: company_id type: integer description: Firma ID in: path required: true - get: + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + patch: tags: - - StockMovements - operationId: listStockMovements - summary: Index - description: >- - Tüm stok hareketlerini listeler. Her irsaliye oluşturulurken stok - hareketi de oluşturulur. Buna ilave olarak, irsaliyeli satış faturası - veya irsaliyeli alış faturası oluşturulduğunda stok takibi yapılan bir - ürün içeren her fatura kalemine karşılık otomatik olarak bir stok - hareketi oluşur. + - ShipmentDocuments + operationId: archiveShipmentDocument + summary: Archive + description: '' parameters: - - name: sort - type: string - in: query - description: 'Sortable parameters - *Available: id, date*' - default: id - - name: 'page[number]' - type: integer - in: query - description: Page Number - default: 1 - - name: 'page[size]' - type: integer - in: query - description: Page Size - default: 15 - minimum: 1 - maximum: 25 - name: include type: string in: query description: >- Response ile birlikte geri dönmesini istediğiniz ilişkiler - - *Available: product, source, contact, warehouse* + *Available: contact, stock_movements, stock_movements.product, tags, + invoices* responses: '200': - description: Stok hareketleri + description: İrsaliye schema: type: object properties: data: - type: array - items: - $ref: '#/definitions/StockMovement' - included: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - warehouses - - products - - shipment_documents - - sales_invoice_details - - purchase_bill_details - - contacts - attributes: - type: object - relationships: - type: object - meta: - $ref: '#/definitions/ListMeta' + $ref: '#/definitions/ShipmentDocument' '400': description: Bad Request schema: @@ -10968,18 +10852,23 @@ paths: type: array items: $ref: '#/definitions/Error' - '/{company_id}/stock_updates': + '/{company_id}/shipment_documents/{id}/unarchive': parameters: - name: company_id type: integer description: Firma ID in: path required: true - post: + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + patch: tags: - - StockUpdates - operationId: createStockUpdate - summary: Create + - ShipmentDocuments + operationId: unarchiveShipmentDocument + summary: Unarchive description: '' parameters: - name: include @@ -10987,84 +10876,1416 @@ paths: in: query description: >- Response ile birlikte geri dönmesini istediğiniz ilişkiler - - *Available: details, details.product, details.warehouse* - - name: stock_update_form + *Available: contact, stock_movements, stock_movements.product, tags, + invoices* + responses: + '200': + description: İrsaliye schema: type: object - required: - - data properties: data: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - stock_updates - attributes: - $ref: '#/definitions/StockUpdateAttributes' - relationships: - type: object - properties: - details: - type: object - properties: - data: - type: array - items: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - stock_update_details - attributes: - $ref: '#/definitions/StockUpdateDetailAttributes' - relationships: - type: object - properties: - product: - type: object - properties: - data: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - products - warehouse: - type: object - properties: - data: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - warehouses - in: body - required: true + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/print': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: printShipmentDocument + summary: Print + description: '' + responses: + '200': + description: İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/update_print_info': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + patch: + tags: + - ShipmentDocuments + operationId: updatePrintInfoShipmentDocument + summary: Update print info + description: '' + parameters: + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: contact, stock_movements, stock_movements.product, tags, + invoices* + - name: shipment_documents_update_print_info + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentUpdatePrintInfoAttributes' + in: body + required: true + responses: + '200': + description: İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/mark_as_printed': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + patch: + tags: + - ShipmentDocuments + operationId: markAsPrintedShipmentDocument + summary: Mark as printed + description: '' + parameters: + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: contact, stock_movements, stock_movements.product, tags, + invoices* + - name: shipment_documents_mark_as_printed + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentMarkAsPrintedAttributes' + in: body + required: true + responses: + '200': + description: İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/link_invoices': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + post: + tags: + - ShipmentDocuments + operationId: linkInvoicesWithShipmentDocument + summary: Link invoices with Shipment Documents + description: '' + parameters: + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: invoices* + - name: shipment_documents_link + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentLinkAttributes' + in: body + required: true + responses: + '201': + description: İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/unlink_invoices': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + delete: + tags: + - ShipmentDocuments + operationId: unlinkInvoicesWithShipmentDocument + summary: Unlink invoices with Shipment Documents + description: '' + parameters: + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: invoices* + - name: shipment_documents_link + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentLinkAttributes' + in: body + required: true + responses: + '204': + description: No content + schema: + type: object + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/e_despatch': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: showEDespatches + summary: Show E-Despatches + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/pdf': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: pdfEDespatch + summary: PDF E-Despatch + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/ubl': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: ublEDespatches + summary: UBL E-Despatches + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/legalize': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + post: + tags: + - ShipmentDocuments + operationId: legalizeEDespatches + summary: Legalize E-Despatches + description: '' + responses: + '201': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/resend': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + patch: + tags: + - ShipmentDocuments + operationId: resendEDespatches + summary: Resend E-Despatches + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/preview': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: previewEDespatches + summary: Preview E-Despatches + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/response_html': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: responseHtmlEDespatch + summary: Response HTML E-Despatch + description: '' + responses: + '200': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/{id}/validate_e_despatch': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + - name: id + type: integer + description: İrsaliye ID + in: path + required: true + post: + tags: + - ShipmentDocuments + operationId: validateEDespatch + summary: Validate E-Despatch HTML E-Despatch + description: '' + responses: + '201': + description: E-İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/EDespatch' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/shipment_documents/download_e_documents': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + get: + tags: + - ShipmentDocuments + operationId: downloadShipmentDocuments + summary: Download e-documents + description: '' + parameters: + - name: 'filter[flow_type]' + type: string + in: query + description: '' + - name: 'filter[invoice_status]' + type: string + in: query + description: '' + - name: 'filter[archived]' + type: boolean + in: query + description: '' + - name: sort + type: string + in: query + description: >- + Sortable parameters - *Available: id, issue_date, description, + inflow* + default: id + - name: 'page[number]' + type: integer + in: query + description: Page Number + default: 1 + - name: 'page[size]' + type: integer + in: query + description: Page Size + default: 15 + minimum: 1 + maximum: 25 + responses: + '200': + description: İrsaliye + schema: + type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/stock_movements': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + get: + tags: + - StockMovements + operationId: listStockMovements + summary: Index + description: >- + Tüm stok hareketlerini listeler. Her irsaliye oluşturulurken stok + hareketi de oluşturulur. Buna ilave olarak, irsaliyeli satış faturası + veya irsaliyeli alış faturası oluşturulduğunda stok takibi yapılan bir + ürün içeren her fatura kalemine karşılık otomatik olarak bir stok + hareketi oluşur. + parameters: + - name: sort + type: string + in: query + description: 'Sortable parameters - *Available: id, date*' + default: id + - name: 'page[number]' + type: integer + in: query + description: Page Number + default: 1 + - name: 'page[size]' + type: integer + in: query + description: Page Size + default: 15 + minimum: 1 + maximum: 25 + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: product, source, contact, warehouse* + responses: + '200': + description: Stok hareketleri + schema: + type: object + properties: + data: + type: array + items: + $ref: '#/definitions/StockMovement' + included: + type: array + items: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - warehouses + - products + - shipment_documents + - sales_invoice_details + - purchase_bill_details + - contacts + attributes: + type: object + relationships: + type: object + meta: + $ref: '#/definitions/ListMeta' + '400': + description: Bad Request + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '401': + description: Unauthorized + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '403': + description: Forbidden + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '404': + description: Not Found + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '422': + description: Unprocessable Entity + schema: + type: object + properties: + errors: + type: array + items: + $ref: '#/definitions/Error' + '/{company_id}/stock_updates': + parameters: + - name: company_id + type: integer + description: Firma ID + in: path + required: true + post: + tags: + - StockUpdates + operationId: createStockUpdate + summary: Create + description: '' + parameters: + - name: include + type: string + in: query + description: >- + Response ile birlikte geri dönmesini istediğiniz ilişkiler - + *Available: details, details.product, details.warehouse* + - name: stock_update_form + schema: + type: object + required: + - data + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - stock_updates + attributes: + $ref: '#/definitions/StockUpdateAttributes' + relationships: + type: object + properties: + details: + type: object + properties: + data: + type: array + items: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - stock_update_details + attributes: + $ref: '#/definitions/StockUpdateDetailAttributes' + relationships: + type: object + properties: + product: + type: object + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - products + warehouse: + type: object + properties: + data: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - warehouses + in: body + required: true responses: '201': description: Stok güncelleme @@ -14376,6 +15597,44 @@ definitions: relationships: {} required: - attributes + EDespatchAttributes: + type: object + properties: + id: + type: string + readOnly: true + type: + type: string + readOnly: true + attributes: + type: object + properties: + uuid: + type: string + env_uuid: + type: string + gib_status_code: + type: string + despatch_no: + type: string + readOnly: true + EDespatch: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - e_despatches + attributes: + $ref: '#/definitions/EDespatchAttributes' + relationships: {} + required: + - attributes EDocumentCommonFormAttributes: type: object properties: @@ -16887,7 +18146,19 @@ definitions: readOnly: false description: Kargo römork araç plakaları drivers_info: - type: string + type: array + items: + type: object + properties: + full_name: + type: string + description: Şöför adı + tckn: + type: string + description: TC kimlik numarası + passport_no: + type: string + description: Pasaport numarası readOnly: false description: Şöför bilgileri procurement_number: @@ -16982,6 +18253,91 @@ definitions: - purchase_bills required: - attributes + ShipmentDocumentLinkAttributes: + allOf: + - type: object + properties: + invoice_type: + description: Fatura tipi + type: string + enum: + - purchase_bills + - sales_invoices + invoice_ids: + description: Eşleştirmek istediğiniz fatura ID'leri + type: array + ShipmentDocumentLink: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentLinkAttributes' + relationships: {} + required: + - attributes + ShipmentDocumentMarkAsPrintedAttributes: + allOf: + - type: object + properties: + procurement_number: + description: İrsaliye Numarası + type: string + ShipmentDocumentMarkAsPrinted: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentMarkAsPrintedAttributes' + relationships: {} + required: + - attributes + ShipmentDocumentUpdatePrintInfoAttributes: + allOf: + - type: object + properties: + print_note: + description: Yazdırma notu + type: string + shipment_date: + description: İrsaliye tarihi + type: string + format: date-time + invoice_no: + description: Fatura ID + type: string + ShipmentDocumentUpdatePrintInfo: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents + attributes: + $ref: '#/definitions/ShipmentDocumentUpdatePrintInfoAttributes' + relationships: {} + required: + - attributes StockMovementAttributes: type: object properties: From 7d1705d28417351b0665b52a2beaae33e14697f2 Mon Sep 17 00:00:00 2001 From: Burak Kara Date: Mon, 27 Feb 2023 13:41:51 +0300 Subject: [PATCH 3/4] add fixed shipment document endpoints --- spec/swagger.yaml | 86 ++++++++++++++++++++++++++--------------------- 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/spec/swagger.yaml b/spec/swagger.yaml index f3286dc..84326fa 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -11147,6 +11147,9 @@ paths: description: Type of the resource enum: - shipment_documents + template_id: + type: integer + description: Yazdırma Şablonu ID attributes: $ref: '#/definitions/ShipmentDocumentMarkAsPrintedAttributes' in: body @@ -11219,8 +11222,8 @@ paths: post: tags: - ShipmentDocuments - operationId: linkInvoicesWithShipmentDocument - summary: Link invoices with Shipment Documents + operationId: linkShipmentDocumentWithInvoices + summary: Link with invoices description: '' parameters: - name: include @@ -11247,8 +11250,17 @@ paths: description: Type of the resource enum: - shipment_documents - attributes: - $ref: '#/definitions/ShipmentDocumentLinkAttributes' + invoice_ids: + description: Eşleştirmek istediğiniz fatura ID'leri + type: array + items: + type: integer + invoice_type: + description: Fatura tipi + type: string + enum: + - purchase_bills + - sales_invoices in: body required: true responses: @@ -11319,8 +11331,8 @@ paths: delete: tags: - ShipmentDocuments - operationId: unlinkInvoicesWithShipmentDocument - summary: Unlink invoices with Shipment Documents + operationId: unlinkShipmentDocumentWithInvoices + summary: Unlink with invoices description: '' parameters: - name: include @@ -11347,15 +11359,27 @@ paths: description: Type of the resource enum: - shipment_documents - attributes: - $ref: '#/definitions/ShipmentDocumentLinkAttributes' + invoice_ids: + description: Eşleştirmek istediğiniz fatura ID'leri + type: array + items: + type: integer + invoice_type: + description: Fatura tipi + type: string + enum: + - purchase_bills + - sales_invoices in: body required: true responses: '204': - description: No content + description: İrsaliye schema: type: object + properties: + data: + $ref: '#/definitions/ShipmentDocument' '400': description: Bad Request schema: @@ -11490,6 +11514,14 @@ paths: operationId: pdfEDespatch summary: PDF E-Despatch description: '' + parameters: + - name: in_place + type: boolean + in: query + description: >- + PDF'e yönlendirmek için true ya da PDF içeriğini JSON formatında + almak için false + default: false responses: '200': description: E-İrsaliye @@ -11845,6 +11877,12 @@ paths: operationId: responseHtmlEDespatch summary: Response HTML E-Despatch description: '' + parameters: + - name: in_place + type: boolean + in: query + description: iFrame olarak almak için true ya da HTML formatında almak için false + default: false responses: '200': description: E-İrsaliye @@ -18253,36 +18291,6 @@ definitions: - purchase_bills required: - attributes - ShipmentDocumentLinkAttributes: - allOf: - - type: object - properties: - invoice_type: - description: Fatura tipi - type: string - enum: - - purchase_bills - - sales_invoices - invoice_ids: - description: Eşleştirmek istediğiniz fatura ID'leri - type: array - ShipmentDocumentLink: - type: object - properties: - id: - type: string - maxLength: 255 - type: - type: string - maxLength: 255 - description: Type of the resource - enum: - - shipment_documents - attributes: - $ref: '#/definitions/ShipmentDocumentLinkAttributes' - relationships: {} - required: - - attributes ShipmentDocumentMarkAsPrintedAttributes: allOf: - type: object From f5c2467abd4b51907df1361679f1cf6760faf5d0 Mon Sep 17 00:00:00 2001 From: Burak Kara Date: Fri, 3 Mar 2023 13:21:08 +0300 Subject: [PATCH 4/4] fix --- spec/swagger.yaml | 82 +++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 35 deletions(-) diff --git a/spec/swagger.yaml b/spec/swagger.yaml index 84326fa..50548b8 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -10951,12 +10951,9 @@ paths: description: '' responses: '200': - description: İrsaliye + description: İrsaliye PDF ya da stream schema: - type: object - properties: - data: - $ref: '#/definitions/ShipmentDocument' + type: string '400': description: Bad Request schema: @@ -11373,7 +11370,7 @@ paths: in: body required: true responses: - '204': + '200': description: İrsaliye schema: type: object @@ -11440,8 +11437,8 @@ paths: get: tags: - ShipmentDocuments - operationId: showEDespatches - summary: Show E-Despatches + operationId: showEDespatch + summary: Show E-Despatch description: '' responses: '200': @@ -11595,12 +11592,9 @@ paths: description: '' responses: '200': - description: E-İrsaliye + description: Zipped E-İrsaliye UBL schema: - type: object - properties: - data: - $ref: '#/definitions/EDespatch' + type: string '400': description: Bad Request schema: @@ -11736,7 +11730,7 @@ paths: summary: Resend E-Despatches description: '' responses: - '200': + '201': description: E-İrsaliye schema: type: object @@ -11808,12 +11802,9 @@ paths: description: '' responses: '200': - description: E-İrsaliye + description: E-İrsaliye as PDF schema: - type: object - properties: - data: - $ref: '#/definitions/EDespatch' + type: string '400': description: Bad Request schema: @@ -11881,16 +11872,15 @@ paths: - name: in_place type: boolean in: query - description: iFrame olarak almak için true ya da HTML formatında almak için false + description: >- + iFrame olarak almak için true ya da JSON içinde HTML formatında + almak için false default: false responses: '200': - description: E-İrsaliye + description: E-İrsaliye as HTML schema: - type: object - properties: - data: - $ref: '#/definitions/EDespatch' + type: string '400': description: Bad Request schema: @@ -11955,13 +11945,9 @@ paths: summary: Validate E-Despatch HTML E-Despatch description: '' responses: - '201': - description: E-İrsaliye - schema: - type: object - properties: - data: - $ref: '#/definitions/EDespatch' + '200': + description: No content + schema: {} '400': description: Bad Request schema: @@ -12054,12 +12040,12 @@ paths: maximum: 25 responses: '200': - description: İrsaliye + description: E-Documents Download URL schema: type: object properties: data: - $ref: '#/definitions/ShipmentDocument' + $ref: '#/definitions/ShipmentDocumentDownloadEDocument' '400': description: Bad Request schema: @@ -15667,7 +15653,7 @@ definitions: maxLength: 255 description: Type of the resource enum: - - e_despatches + - EDespatch attributes: $ref: '#/definitions/EDespatchAttributes' relationships: {} @@ -18291,6 +18277,32 @@ definitions: - purchase_bills required: - attributes + ShipmentDocumentDownloadEDocumentAttributes: + type: object + properties: + result_url: + type: string + readOnly: true + jid: + type: string + readOnly: true + ShipmentDocumentDownloadEDocument: + type: object + properties: + id: + type: string + maxLength: 255 + type: + type: string + maxLength: 255 + description: Type of the resource + enum: + - shipment_documents_download_e_document + attributes: + $ref: '#/definitions/ShipmentDocumentDownloadEDocumentAttributes' + relationships: {} + required: + - attributes ShipmentDocumentMarkAsPrintedAttributes: allOf: - type: object