### Get Product Category List - Example Request JSON Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_category_list Provides an example JSON payload for requesting a list of product categories. It includes parameters for pagination such as the number of items per page and the page number. ```json { "count":10, "page":1 } ``` -------------------------------- ### Order Registration Request JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_register Provides an example JSON payload for registering an order. This payload includes details about the shop, recipient, order specifics, and product information. Note that certain fields become optional or have default values based on other field selections, such as product_id. ```json { "register_type": 0, "shop_id":"7c4s979...", "address":"tehran-…", "city_code":"1", "province_code":"1", "description":null, "email":null, "employee_code":"-1", "first_name":"my first name", "last_name":"my last name", "mobile":"09011111111", "phone":null, "postal_code":"1313131313", "pay_type":"1", "order_type":"0", "box_id": 10, "kiosk_id": 101, "pre_paid_price": 0, "package_weight": 10, "presenter_code":999, "manual_id":"1", "has_insurance":"true", "content_type": 1, "products":[ { "count": 1, "discount": 0, "price": 5000, "title": "my product title", "weight":500, "product_id": null } ] } ``` -------------------------------- ### Order Label API Request Payload Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_label Provides an example JSON payload for requesting order labels. It requires a 'shop_id' and a list of 'orders' to be processed. ```json { "shop_id":"fc45949a-921d-4b4f-1ade-ab5180f7dcve", "orders":["0053a338-7958-45a8-b8b9-5bd721ae5218","5549024c-f9f6-4ed3-be10-043a254a5df8"] } ``` -------------------------------- ### Get Product Category List - Example Response JSON Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_category_list Illustrates the expected JSON response when successfully retrieving a list of product categories. The response includes status information, pagination details, and a list of categories with their IDs and titles. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f", "title": "مجلات", "parent_category_id": null }, { "category_id": "3421e007-1b61-4130-a1ed-7e52d8f6260f", "title": "کتاب", "parent_category_id": null }, { "category_id": "e1a522ce-1fae-435e-ab6e-7a67799ce359", "title": "بدون دسته بندی", "parent_category_id": null } ], "count": 3, "page": 1, "total_count": 3 } } ``` -------------------------------- ### Get Product List API Endpoint and Method Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_list Defines the URL endpoint and HTTP method for retrieving a list of products. This is a POST request to '/api/v2/public/product/list/'. ```text URL = '/api/v2/public/product/list/' METHOD = 'POST' ``` -------------------------------- ### Example JSON Response for State and City Data Source: https://api.tapin.ir/api/v2/public/doc/index_fn=external_province_tree This is an example of the JSON response received when querying for state and city data. The response includes a status and message, followed by an 'entries' array. Each entry represents a state with its code, title, and a list of cities, each with its code and title. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": [ { "code": 1, "title": "تهران", "cities": [ { "code": 1, "title": "تهران" }, { "code": 331, "title": "اسلام شهر" }, { "code": 1011, "title": "منطقه 11 پستي تهران" }, { "code": 1013, "title": "منطقه 13 پستي تهران" }, { "code": 1014, "title": "منطقه 14 پستي تهران" }, { "code": 1015, "title": "منطقه 15 پستي تهران" }, { "code": 1016, "title": "منطقه 16 پستي تهران" }, { "code": 1017, "title": "منطقه 17 پستي تهران\r\n" } ] } ] } ``` -------------------------------- ### Response JSON for Order List Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_list Example JSON output received after successfully querying the order list endpoint. It contains return status, a list of orders, and pagination details. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "id": "d95d0f45-6162-4ec3-bd29-09452c148b40", "barcode": "21294720411963211126", "order_id": 16013, "status": 2, "first_name": "my first name", "last_name": "my last name", "mobile": "09122222222", "state_code": "2", "city_code": "41", "pay_type": "1", "order_type": 0, "created_at": "1398-05-13 12:23" } ], "count": 1, "page": 1, "total_count": 15 } } ``` -------------------------------- ### Order Details API Response JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_detail Illustrates the structure of a successful JSON response from the Order Details API. It includes order status, recipient information, package details, and product breakdown. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "id": "d95d0f45-6162-4ec3-bd29-09452c148b40", "barcode": "21292000411901545180", "order_id": 16013, "status": 2, "first_name": "my first name", "last_name": "my last name", "state_code": "2", "city_code": "41", "address": "tehran-.", "postal_code": "1343242123", "email": "", "phone": "02166810643", "mobile": "09011111111", "pay_type": "1", "order_type": 0, "description": "", "package_weight": 10, "insurance_price": 0, "insurance_tax": 0, "total_weight": 210, "factor_price": 552102, "factor_title": " نیازی به دریافت وجه نمی\u200cباشد (Online", "created_at": "1398-05-13 12:23", "kiosk_id": 101, "products": [ { "count": 1, "discount": 0, "price": 500000, "title": "none", "weight": 200, "product_id": null } ] } } ``` -------------------------------- ### Shop Detail API Response JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=shop_detail Illustrates the structure of the JSON response when requesting shop details. It includes a 'returns' object for status and messages, and an 'entries' object containing comprehensive shop information. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "title": "my shop title", "shop_message": "thank you", "available_hours": "09-21", "province_code": "2", "city_code": "1", "address": "tehran-acağını", "postal_code": "1111111111", "phone": "0216666666", "logo": "data:image/png;base64,iVBORw0KGgoAAAANS...", "owner_first_name": "my first name", "owner_last_name": "my last name", "owner_username": "my username", "owner_mobile": "09011111111", "service_price": 10000, "service_price_tax": 900, "post_service_price": 5000, "post_service_price_tax": 450, "sms_price": 5000, "sms_price_tax": 450, "send_sms": false, "total_price": 16350, "created_at": "1397-11-05 21:01", "status": 1, "status_display": "فعال" } } ``` -------------------------------- ### Task List Request Payload Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=task_list Example JSON payload for the task list API request. It specifies the desired number of items per page ('count') and the page number ('page'). Both fields are required and cannot be null or blank. ```json { "count": 2, "page": 1 } ``` -------------------------------- ### Credit Panel API Endpoint Configuration Source: https://api.tapin.ir/api/v2/public/doc/index_fn=transaction_credit Defines the URL and HTTP method for the credit panel API. This is a common setup for interacting with the API. ```python URL = '/api/v2/public/transaction/credit/' METHOD = 'POST' ``` -------------------------------- ### Order Details API Request JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_detail Provides a sample JSON payload for the POST request to retrieve order details. It requires 'shop_id' (string) and 'order_id' (integer). ```json { "shop_id":"fc45949a-921d-4b4f-1ade-ab5180f7dcve", "order_id":16013 } ``` -------------------------------- ### Order Registration Response JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_register Illustrates the typical JSON response received after a successful order registration. The response includes the status of the operation, a success message, and details about the registered order, such as its barcode and order ID. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "barcode": "21242000512705555221", "order_id": 16013, "status": 2, "first_name": "my first name", "last_name": "my last name", "state_code": "2", "city_code": "41", "insurance_price": 0, "insurance_tax": 0, } } ``` -------------------------------- ### Shop List Response JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=shop_list Illustrates the structure of the JSON response received after a successful shop list request. The response contains status information, a list of shop entries (each with an 'id' and 'title'), and pagination details ('count', 'page', 'total_count'). All fields in the entries are mandatory. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "id": "7c42379...", "title": "My Shop Title" } ], "count": 1, "page": 1, "total_count": 1 } } ``` -------------------------------- ### Get Customer List Endpoint Configuration Source: https://api.tapin.ir/api/v2/public/doc/index_fn=customer_list Defines the URL and HTTP method for retrieving customer lists. This is a POST request to '/api/v2/public/customer/list/'. ```python URL = '/api/v2/public/customer/list/' METHOD = 'POST' ``` -------------------------------- ### Credit Panel API Request JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=transaction_credit Provides a sample JSON payload for requesting to add credit to a panel. It requires a shop ID. ```json { "shop_id":"7c45979e-926d-4a4f-8ade-ab5180f7daee" } ``` -------------------------------- ### Response JSON for Product List Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_list Illustrates the structure of the JSON response when successfully retrieving a list of products. It includes status information, a list of product entries with their details, and pagination metadata. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "product_id": 1924, "title": "product_title", "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f", "weight": 500, "price": 800000, "created_at": "1398-04-19 17:07" } ], "count": 1, "page": 1, "total_count": 3 } } ``` -------------------------------- ### Get Product Category List - Request Details Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_category_list Defines the URL and HTTP method for retrieving product categories. This is a POST request to the specified endpoint. ```plaintext URL = '/api/v2/public/product/category/list/' METHOD = 'POST' ``` -------------------------------- ### API Endpoint for Individual Price Query (GET) Source: https://api.tapin.ir/api/v2/public/doc/index_fn=external_province_tree This snippet shows the URL and HTTP method required to query individual prices from the Tapin API. It's a simple GET request to retrieve state and city data. No specific request body is needed. ```text URL = 'https://public.api.tapin.ir/api/v1/public/state/tree/' METHOD = 'GET' ``` -------------------------------- ### POST /api/v2/public/product/list/ Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_list Retrieves a list of products based on the provided criteria. You can specify pagination details, shop ID, and various filters to narrow down the product search. The response includes a list of products matching the criteria along with pagination information. ```APIDOC ## POST /api/v2/public/product/list/ ### Description Retrieves a list of products from a shop with optional filtering capabilities. Supports pagination and detailed product attribute filtering. ### Method POST ### Endpoint /api/v2/public/product/list/ ### Parameters #### Request Body - **count** (int) - Required - The number of items to display per page. - **page** (int) - Required - The page number for pagination. - **shop_id** (str) - Required - The unique identifier of the shop. - **product_id** (int) - Optional - The unique identifier of a specific product. - **title** (string) - Optional - The name of the product to filter by. - **category_id** (string) - Optional - The identifier of the product category. - **weight** (int) - Optional - The weight of the product in grams. - **price** (int) - Optional - The price of the product. - **created_at** (string) - Optional - The creation date of the product. Accepts formats like 'YYYY-MM-DD HH:MM' or 'YYYY-MM-DD'. Example: '1398-11-12 12:30' or '1398-11-12'. ### Request Example ```json { "count": 10, "page": 1, "shop_id": "fc45949a-921d-4b4f-1ade-ab5180f7dcve", "created_at": "1398-11-12" } ``` ### Response #### Success Response (200) - **returns** (object) - Contains status and message of the operation. - **status** (int) - HTTP status code. - **message** (string) - Description of the operation result. - **entries** (object) - Contains the list of products and pagination details. - **list** (array) - An array of product objects. - **product_id** (int) - Unique identifier for the product. - **title** (string) - Name of the product. - **category_id** (string) - Identifier for the product's category. - **weight** (int) - Weight of the product in grams. - **price** (int) - Price of the product. - **created_at** (string) - Creation date of the product. - **count** (int) - Number of products returned in the current page. - **page** (int) - Current page number. - **total_count** (int) - Total number of products available. #### Response Example ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "product_id": 1924, "title": "product_title", "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f", "weight": 500, "price": 800000, "created_at": "1398-04-19 17:07" } ], "count": 1, "page": 1, "total_count": 3 } } ``` ``` -------------------------------- ### Insurance List API Request and Response Examples Source: https://api.tapin.ir/api/v2/public/doc/index_fn=insurance_list Demonstrates the expected JSON structure for both sending a request to and receiving a response from the insurance list API. The request body is an empty JSON object, while the response contains status, message, and a list of insurance entries with their details. ```json {} ``` ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "rate": 100000, "amount_of": 0, "amount_to": 6000000000, "tax": 9000, "uuid": "bab3696d-51de-40be..." } ], "count": 1, "page": 1, "total_count": 1 } } ``` -------------------------------- ### Credit Panel API Response JSON Example Source: https://api.tapin.ir/api/v2/public/doc/index_fn=transaction_credit Illustrates the expected JSON response after a successful credit operation. It includes a status message and the updated credit amount. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "credit": 4492059 } } ``` -------------------------------- ### Customer List Request JSON Payload Source: https://api.tapin.ir/api/v2/public/doc/index_fn=customer_list Example JSON payload for requesting a customer list. It includes parameters for pagination ('count', 'page') and filtering ('shop_id'). Additional fields can be sent for more specific filtering. ```json { "count":10, "page":1, "shop_id": "fc45949a-921d-4b4f-1ade-ab5180f7dcve" } ``` -------------------------------- ### Customer List Response JSON Payload Source: https://api.tapin.ir/api/v2/public/doc/index_fn=customer_list Example JSON payload for the successful response when retrieving a customer list. It includes status information and a list of customer entries with their details. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "customer_id": "6be2233c-e311-48e2-bef0-e7c06d0f1583", "category_id": "5f591570-f1d3-44ad-86d9-ebe8a3a1592e", "phone": "02166666666", "first_name": "نام", "last_name": "نام خانوادگی", "mobile": "09122222222", "email": "test@tapin.ir", "postal_code": "1111111111", "created_at": "1397-11-06 19:49", "city": 541, "state": 3 } ], "count": 1, "page": 1, "total_count": 1 } } ``` -------------------------------- ### Task List Response Structure Source: https://api.tapin.ir/api/v2/public/doc/index_fn=task_list Example JSON output from the task list API. It includes a 'returns' object with status and message, and an 'entries' object containing a list of tasks, pagination details, and total counts. Each task has an ID, type, status, and creation timestamp. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "id": "e433b239-d961-4efe-98h4-be5e07f1047e", "task_type": 0, "task_status": 3, "created_at": "2020-01-23T22:20:51.996131" }, { "id": "d5447909-64e8-444f-bea0-8ea87a338g3f", "task_type": 0, "task_status": 4, "created_at": "2020-01-22T12:30:18.734206" } ], "count": 2, "page": 1, "total_count": 5 } } ``` -------------------------------- ### Request JSON for Bulk Order Status Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_get_status_bulk Example JSON payload to send to the API for fetching the status of multiple orders. It requires a shop ID and a list of order objects, each with an ID. ```JSON { "shop_id": "690a71b3-5cf5-45bf-9561-57e854e08972", "orders": [ { "id": "a93f6b7f-d05e-4bee-a700-deb0d16572bf" } ] } ``` -------------------------------- ### Define API Endpoint and Method for Product Creation Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_create This snippet defines the URL and HTTP method required to create a new product. It serves as a configuration for making the API request. No external dependencies are required. ```python URL = '/api/v2/public/product/create/' METHOD = 'POST' ``` -------------------------------- ### Response JSON for Bulk Order Status Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_get_status_bulk Example JSON response from the API containing the status and barcode information for the requested orders. Includes processing status and a list of order entries with their details. ```JSON { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "order_id": 19393, "id": "a93f6b7f-d05e-4bee-a700-deb0d16572bf", "barcode": "", "status": 100 } ], "count": 1, "page": 1, "total_count": 1 } } ``` -------------------------------- ### POST /api/v2/public/product/create/ Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_create This endpoint is used to create a new product. It requires product details in the request body and returns the status of the operation along with the created product's information. ```APIDOC ## POST /api/v2/public/product/create/ ### Description This endpoint is used to create a new product. It requires product details in the request body and returns the status of the operation along with the created product's information. ### Method POST ### Endpoint /api/v2/public/product/create/ ### Parameters #### Request Body - **shop_id** (string) - Required - Description: شناسه فروشگاه - **title** (string) - Required - Description: نام محصول - **category_id** (string) - Required - Description: شناسه گروه محصول - **weight** (int) - Required - Description: وزن - **price** (int) - Required - Description: قیمت - **description** (string) - Optional - Description: توضیحات ### Request Example ```json { "shop_id": "f429ee63...", "title": "TEST_PRODUCT", "price": 100, "weight": 100, "description": null, "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f" } ``` ### Response #### Success Response (200) - **returns** (object) - Description: Operation status - **status** (int) - HTTP status code - **message** (string) - Operation message - **entries** (object) - Description: Created product details - **product_id** (int) - Unique identifier for the product - **title** (string) - Name of the product - **category_id** (string) - ID of the product's category - **weight** (int) - Weight of the product - **price** (int) - Price of the product - **created_at** (string) - Timestamp of creation #### Response Example ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "product_id": 3670, "title": "TEST_PRODUCT", "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f", "weight": 100, "price": 100, "created_at": "1399-02-26 23:26" } } ``` ``` -------------------------------- ### GET /api/v2/public/employee/list Source: https://api.tapin.ir/api/v2/public/doc/index_fn=employee_list Retrieves a paginated list of employees based on the provided criteria. ```APIDOC ## GET /api/v2/public/employee/list ### Description Retrieves a paginated list of employees based on the provided criteria. This endpoint is used to fetch employee data with options for specifying the number of items per page and the page number. ### Method POST ### Endpoint /api/v2/public/employee/list/ ### Parameters #### Query Parameters None #### Request Body - **count** (int) - Required - The number of items to display per page. - **page** (int) - Required - The page number to retrieve. - **shop_id** (str) - Required - The ID of the shop to filter employees by. ### Request Example ```json { "count":10, "page":1, "shop_id":"7c45979e-926d-1a2f-6ade-vb5180f7daee" } ``` ### Response #### Success Response (200) - **returns** (object) - Contains status and message of the operation. - **status** (int) - The HTTP status code. - **message** (str) - A message indicating the success of the operation. - **entries** (object) - Contains the list of employees and pagination details. - **list** (array) - An array of employee objects. - **first_name** (str) - The first name of the employee. - **last_name** (str) - The last name of the employee. - **username** (str) - The username of the employee. - **employee_code** (int) - The employee's code. - **count** (int) - The number of items returned in the current page. - **page** (int) - The current page number. - **total_count** (int) - The total number of employees available. #### Response Example ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "first_name": "test first name", "last_name": "test last name", "username": "09011111111", "employee_code": -1 } ], "count": 1, "page": 1, "total_count": 1 } } ``` ``` -------------------------------- ### Get Order Status Bulk API Configuration Source: https://api.tapin.ir/api/v2/public/doc/index_fn=order_get_status_bulk Defines the URL and HTTP method for the bulk order status retrieval API. This is a POST request to the specified endpoint. ```Shell URL = '/api/v2/public/order/post/get-status/bulk/' METHOD = 'POST' ``` -------------------------------- ### POST /api/v2/public/shop/create/ Source: https://api.tapin.ir/api/v2/public/doc/index_fn=shop_create Register a new shop in the Tapin platform. This endpoint accepts comprehensive shop registration data including owner information, address details, and business credentials. Supports both individual and legal entity registrations with conditional fields for legal entities. ```APIDOC ## POST /api/v2/public/shop/create/ ### Description Register a new shop in the Tapin platform. This endpoint accepts comprehensive shop registration data including owner information, address details, and business credentials. Supports both individual and legal entity registrations. ### Method POST ### Endpoint /api/v2/public/shop/create/ ### Request Body #### Required Fields - **shop_name** (string) - نام فروشگاه (Shop name) - **first_name** (string) - نام (First name) - **last_name** (string) - نام خانوادگی (Last name) - **email** (string) - ایمیل (Email address) - **father_name** (string) - نام پدر (Father's name) - **mobile** (string) - موبایل (Mobile phone number) - **birth_date** (string) - تاریخ تولد (Birth date in format YYYY-MM-DD) - **certificate_code** (string) - شماره شناسنامه (Certificate number) - **certificate_serial_number** (string) - سریال شناسنامه (Certificate serial number) - **birthday_location** (string) - محل تولد (Birth location) - **national_code** (string) - کد ملی (National code) - **address** (string) - آدرس (Full address) - **province** (integer) - کد استان (Province code) - **city** (integer) - شهر (City code) - **postal_code** (string) - کد پستی (Postal code) - **unit** (string) - واحد (Unit number) - **floor** (string) - طبقه (Floor number) - **plaque** (string) - پلاک (Plaque number) - **latitude** (float) - عرض جغرافیایی (Geographic latitude) - **longitude** (float) - طول جغرافیایی (Geographic longitude) - **website** (string) - وبسایت (Website URL) - **available_hours** (string) - ساعت کاری فروشگاه (Shop operating hours) - **instagram_id** (string) - شناسه اینستاگرام (Instagram ID) - **logo_image** (string) - لوگو فروشگاه (Shop logo as base64, max 1MB) - **id_cart_image** (string) - عکس کارت ملی (ID card image as base64, max 1MB) - **is_legal_shop** (boolean) - آیا فروشگاه حقوقی هست (Is this a legal entity shop) #### Optional Fields - **phone** (string) - تلفن (Telephone number) - **shop_description** (string) - توضیحات فروشگاه (Shop description) - **company_name** (string) - نام شرکت (Company name, required if is_legal_shop is true) - **economic_code** (string) - کد اقتصادی شرکت (Economic code, required if is_legal_shop is true) - **company_national_code** (string) - کد ملی شرکت (Company national code, required if is_legal_shop is true) - **register_code** (string) - شناسه ثبت شرکت (Company registration code, required if is_legal_shop is true) ### Request Example ```json { "shop_name": "فروشگاه تست", "first_name": "نام", "last_name": "نام خانوادگی", "email": "test@gmail.com", "father_name": "نام پدر", "phone": "02166666666", "mobile": "09120000000", "birth_date": "1997-01-31", "certificate_code": "1111111111", "certificate_serial_number": "1111111111", "birthday_location": "تهران", "national_code": "1111111111", "address": "تهران", "province": 1, "city": 1, "postal_code": "1311111111", "unit": 1, "floor": 1, "plaque": 1, "latitude": 56.25, "longitude": 46.574, "website": "test.com", "available_hours": "12-24", "instagram_id": "@tapin", "shop_description": "توضیحات", "logo_image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPCAIAAACwQdIgAAAAA3NCSVQICAjb4U/gAAAA10lEQVQokWN0tjFxNBfg5mRmwAtY3GyE2FgY8StiYGBggivCr5YJzpLWllIykmNiwq4eoY6JiUHJVN48xEhAghefOgjgFuQy9tPXsFVhYWXGp46BgYGRkVFGS9Iy3ERUXgifOghg52bT99DWc9Nk55JjYGBgwaUOAsQURYSkBO+cvI/TPDhgYWcWkOInYN73zz9uHr775vE7nOr+//v/+Oqzu6cf/P39D6f7vrz5ev3Q7Y+vPyNsR1Px78+/e2cfPbz0+P8/VFcic94//XD90O1vn35g2gAAJh45fIebGSgAAAAASUVORK5CYII=", "id_cart_image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPCAIAAACwQdIgAAAAA3NCSVQICAjb4U/gAAAA10lEQVQokWN0tjFxNBfg5mRmwAtY3GyE2FgY8StiYGBggivCr5YJzpLWllIykmNiwq4eoY6JiUHJVN48xEhAghefOgjgFuQy9tPXsFVhYWXGp46BgYGRkVFGS9Iy3ERUXgifOghg52bT99DWc9Nk55JjYGBgwaUOAsQURYSkBO+cvI/TPDhgYWcWkOInYN73zz9uHr775vE7nOr+//v/+Oqzu6cf/P39D6f7vrz5ev3Q7Y+vPyNsR1Px78+/e2cfPbz0+P8/VFcic94//XD90O1vn35g2gAAJh45fIebGSgAAAAASUVORK5CYII=", "is_legal_shop": true, "company_name": "تاپین", "economic_code": "11111111", "company_national_code": "11111111", "register_code": "11111111" } ``` ### Response #### Success Response (200) - **returns** (object) - Response status and message - **status** (integer) - HTTP status code (200 for success) - **message** (string) - Success message (عملیات با موفقیت انجام شد.) - **entries** (object) - Created shop data - **id** (string) - Unique identifier (UUID) of the newly created shop #### Response Example ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "id": "09443182-ccd7-4631-ae51-5dde361a06f6" } } ``` ### Notes - All image fields (logo_image, id_cart_image) must be provided as base64-encoded strings - Maximum file size for images is 1MB - Birth date must be in YYYY-MM-DD format (Gregorian calendar) - Company-related fields are optional but required when is_legal_shop is true - Province and city codes must correspond to valid Iranian administrative divisions ``` -------------------------------- ### Get Employee List API Endpoint Details Source: https://api.tapin.ir/api/v2/public/doc/index_fn=employee_list Specifies the URL and HTTP method for retrieving employee lists. This endpoint requires a POST request and is part of the public API v2. ```text URL = '//api/v2/public/employee/list/' METHOD = 'POST' ``` -------------------------------- ### Request JSON for Creating a New Product Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_create This JSON structure represents the payload required to create a new product. It includes fields like shop ID, title, price, weight, category ID, and an optional description. All fields except description are mandatory. ```json { "shop_id": "f429ee63...", "title": "TEST_PRODUCT", "price": 100, "weight": 100, "description": null, "category_id":"3d65e6eb-ca0d-47b3-9934-6295a355872f" } ``` -------------------------------- ### Response JSON Structure After Product Creation Source: https://api.tapin.ir/api/v2/public/doc/index_fn=product_create This JSON structure illustrates the successful response received after creating a new product. It includes a status message and details of the created product, such as its ID, title, category, and creation timestamp. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "product_id": 3670, "title": "TEST_PRODUCT", "category_id": "3d65e6eb-ca0d-47b3-9934-6295a355872f", "weight": 100, "price": 100, "created_at": "1399-02-26 23:26" } } ``` -------------------------------- ### GET /api/v2/public/state/tree/ Source: https://api.tapin.ir/api/v2/public/doc/index_fn=province_tree Retrieves a list of provinces and their corresponding cities. This endpoint returns a hierarchical structure of states and cities. ```APIDOC ## GET /api/v2/public/state/tree/ ### Description Retrieves a list of provinces and their corresponding cities. This endpoint returns a hierarchical structure of states and cities. ### Method POST ### Endpoint /api/v2/public/state/tree/ ### Parameters #### Query Parameters None #### Request Body - **None** ### Request Example ```json {} ``` ### Response #### Success Response (200) - **returns** (object) - Contains status and message of the operation. - **status** (int) - HTTP status code. - **message** (str) - Operation status message. - **entries** (list) - A list of provinces. - **code** (int) - Province code. - **title** (str) - Province name. - **cities** (list) - A list of cities within the province. - **code** (int) - City code. - **title** (str) - City name. #### Response Example ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": [ { "code": 1, "title": "تهران", "cities": [ { "code": 1, "title": "تهران" }, { "code": 331, "title": "اسلام شهر" }, { "code": 1011, "title": "منطقه 11 پستي تهران" }, { "code": 1013, "title": "منطقه 13 پستي تهران" }, { "code": 1014, "title": "منطقه 14 پستي تهران" }, { "code": 1015, "title": "منطقه 15 پستي تهران" }, { "code": 1016, "title": "منطقه 16 پستي تهران" }, { "code": 1017, "title": "منطقه 17 پستي تهران\r\n" } ] } ] } ``` ``` -------------------------------- ### Response JSON for City List API Source: https://api.tapin.ir/api/v2/public/doc/index_fn=city_list This sample JSON represents the successful output from the city list API. It contains a 'returns' object with status and message, and an 'entries' object detailing the 'list' of cities (each with a 'code' and 'title'), 'count' of items on the current page, 'page' number, and 'total_count' of all available cities. ```json { "returns": { "status": 200, "message": "عملیات با موفقیت انجام شد." }, "entries": { "list": [ { "code": 1, "title": "تهران" }, { "code": 331, "title": "اسلام شهر" }, { "code": 1011, "title": "منطقه 11 پستي تهران" }, { "code": 1013, "title": "منطقه 13 پستي تهران" }, { "code": 1014, "title": "منطقه 14 پستي تهران" } ], "count": 5, "page": 1, "total_count": 115 } } ``` -------------------------------- ### نمونه JSON خروجی استعلام قیمت - API Tapin Source: https://api.tapin.ir/api/v2/public/doc/index_fn=external_order_post_office_check_price این نمونه JSON ساختار پاسخ دریافتی از API پس از استعلام قیمت را نشان می‌دهد. شامل اطلاعاتی مانند وضعیت موفقیت‌آمیز بودن عملیات، هزینه ارسال، هزینه ارسال بدون احتساب پرداخت در محل، مالیات و جمع کل هزینه است. این داده‌ها برای نمایش هزینه‌های محاسبه شده به کاربر استفاده می‌شوند. ```json { "returns": { "status": 200, "message": "success." }, "entries": { "send_price": 135700, "just_send_price": 135700, "tax": 12213, "total": 147913 } } ```