swagger-client
This documentation is created by Getir Developers for Getir-Locals Integration.For this integration, you need to take CLIENT NAME and CLIENT SECRET keys from Getir-dev team and use these keys for authentication. You also need to use access token provided after successful login to be able to use all other endpoints You can view information about the active order through /orders/unapproved endpoints. The status of the order is managed via verify, prepare, handover and cancel endpoints. Details on order management are as follows: For orders to be made by the Getir courier, the flow is as follows: Supplier confirms order --verify
Supplier prepares order --prepare (1-2 minutes must pass before delivery)
Supplier hands over the order to Getir courier --handover
For Getir delivery, transactions are made by the Getir courier after handover. A valid reason will be requested from the supplier to cancel an order. Valid reasons may vary depending on the instant status of the order. For this reason, before canceling an order, you have to get instant valid order cancellation reasons from /orders/{orderId}/cancel-options endpoint.
This Python package is automatically generated by the Swagger Codegen project:
- API version: 0.0.1
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
Requirements.
Python 2.7 and 3.4+
Installation & Usage
pip install
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
Then import the package:
import swagger_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import swagger_client
Getting Started
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = swagger_client.AuthApi(swagger_client.ApiClient(configuration))
try:
# This endpoint is used to get a token for authentication.
api_response = api_instance.login()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthApi->login: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://locals-integration-api-gateway.artisandev.getirapi.com
Class | Method | HTTP request | Description |
---|---|---|---|
AuthApi | login | POST /v1/auth/token | This endpoint is used to get a token for authentication. |
HealthApi | health_check | GET /health | Health Check for Getir Infrastructure |
OrdersApi | cancel_options | GET /v1/orders/{orderId}/cancel-options | This method is used to select cancel reasons according to delivery option. |
OrdersApi | cancel_order | POST /v1/orders/{orderId}/shop/{shopId}/cancel | This method is used to cancel the order. |
OrdersApi | cancelled_orders | GET /v1/orders/cancelled | It is used to get the list of cancelled orders by shop. |
OrdersApi | deliver_order | POST /v1/orders/{orderId}/shop/{shopId}/deliver | This method is used for the delivery of the prepared order. |
OrdersApi | get_order | GET /v1/orders/{orderId} | This method is used to get details of an order |
OrdersApi | get_order_report | GET /v1/orders/report | It is used to get the list of orders by shopIds,startDate and endDate. |
OrdersApi | handover_order | POST /v1/orders/{orderId}/shop/{shopId}/handover | This method is used for the delivery of the prepared order to the courier. |
OrdersApi | prepare_order | POST /v1/orders/{orderId}/shop/{shopId}/prepare | This method is used to change the prepared order to the prepared status |
OrdersApi | send_invoice | POST /v1/orders/{orderId}/invoice-link | This method is used to send the order's invoice to the client |
OrdersApi | unapproved_orders | GET /v1/orders/unapproved | It is used to get the list of unapproved orders by shop. |
OrdersApi | verify_order | POST /v1/orders/{orderId}/shop/{shopId}/verify | This method is used to approve the incoming order by the shop |
ProductsApi | get_batch_request_result | GET /v1/products/price-and-quantity/batch-requests/{batchRequestId} | Get products update result with using batchRequestId |
ProductsApi | get_chain_products | GET /v1/products | Product integration allows you to list information such as stock, price, brand of seller's listings. |
ProductsApi | get_chain_productsby_chain_id | GET /v1/chains/{chainId}/products | This method is used to get products by chain id. |
ProductsApi | get_shop_productsby_shop_id | GET /v1/shops/{shopId}/products | This method is used to get products by shop id. |
ProductsApi | update_price_and_quantity | PUT /v1/products/price-and-quantity | Update price and quantity of products |
ShopsApi | get_shop | GET /v1/shops/{shopId} | It is used to get the shop informations. |
ShopsApi | update_shop_courier_working_status | PUT /v1/shops/{shopId}/couriers/working-status | It is used to put the shops couiers working status. |
ShopsApi | update_shop_working_hours | PUT /v1/shops/{shopId}/working-hours | It is used to put the shops working hours. |
ShopsApi | update_shop_working_status | PUT /v1/shops/{shopId}/working-status | It is used to put the shops working status. |
SupplierApi | get_supplier | GET /v1/suppliers/supplier | get supplier data. |
SupplierApi | reset_password | PUT /v1/suppliers/password/reset | Shops can reset the password they use via this endpoint and create a new password. |
Documentation For Models
- ApiResponseAuthenticationResponse
- ApiResponseGetShopResponse
- ApiResponseListCancelOptionResponse
- ApiResponseListOrderResponse
- ApiResponseObject
- ApiResponseOrderReportResponse
- ApiResponseOrderReportResponseWrapper
- ApiResponsePageableResponseShopProductsResponse
- ApiResponsePageableResponseShopProductsResponseData
- ApiResponsePriceAndQuantityBatchResponse
- ApiResponsePriceAndQuantityBatchResponseWrapper
- ApiResponseProductBatchTicketResponse
- ApiResponseShopCouriersWorkingStatusResponse
- ApiResponseShopWorkingHoursResponse
- ApiResponseVoid
- ArtisanOrderResponse
- AuthenticationResponse
- CancelOptionResponse
- CancelOrderRequest
- CustomerResponse
- FieldValidation
- GeneralError
- GeneralErrorWrapper
- GetShopResponse
- HealthResponse
- InternalError
- InternalErrorWrapper
- InvoiceAddressResponse
- InvoiceRequest
- MenuOptionsResponse
- Model5001InternalError
- NameResponse
- OperationResult
- OrderDtoResponse
- OrderResponse
- PageSizeInvalidError
- PageSizeInvalidErrorMeta
- PageableResponseSupplierProductResponse
- PasswordResetRequest
- PaymentMethodTextResponse
- PreparedOrderRequest
- PriceAndQuantityBatchProductResponse
- ProductBatchRequest
- ProductBatchTicketResponse
- ProductRequest
- ProductResponse
- ShopCouriersWorkingStatusResponse
- ShopProductsResponse
- ShopWorkingHoursResponse
- SupplierDataChainResponse
- SupplierDataResponse
- SupplierDataResponseWrapper
- SupplierDataShopResponse
- SupplierProductResponse
- UpdateShopCouriersStatusRequest
- UpdateShopStatusRequest
- UpdateShopWorkingHoursRequest
- UpdatedProduct
Documentation For Authorization
basicAuth
- Type: HTTP basic authentication