# E-shop contract creation POST /eshop/v2/create This method is used to create contract and primal data exchange between E-shop and e-Leasing+ online platform. Data exchange is in the safe background mode (Server To Server). API key is provided by "AS Inbank filialas" once the contract is signed. Return_url is used to return user to E-shop webpage. Order_id parameter defines unique shopping cart id. Alert_Url is used to inform Eshop about major changes in the process. If the term attribute will be provided, the contract will be evaluated for that specific term without possibility to change it later in the process. The price attribute in shopping cart list order_json must be filled by price per unit. Error code attribute defines the result of the user authentication. If this value is empty - authentication was successful; otherwise error code will be filled, and the error definition will provide further information about the error. In case of successful authentication, appl_token parameter is filled with unique value; otherwise it is empty. appl_token attribute value is required for the further steps, this parameter is a unique identifier that is valid for only a certain period of time. Endpoint: POST /eshop/v2/create Security: apiKeyAuth ## Request fields (application/json): - `uuid` (string, required) Eshop unique identifier. - `tariff_code` (string) If e-shop have assigned 2 or more tariffs/products this parameter is mandatory, otherwise - optional. Use product information endpoint to get the list. - `term` (number) Contract term. - `return_url` (string, required) Return URL. - `alert_url` (string, required) Alert URL. - `order_id` (string, required) E-shop shopping cart unique ID, must include character [A-Z]. - `order_amount` (number, required) Decimal may be divided by dot or comma. Separation of thousands may not be used. Sum must exceed 0 EUR and equal to the order basket "order_json". - `order_currency` (string) Currency code by ISO-4217. For example: LTL, EUR, USD. If field is not set, then our system default currency till 2014-12-31 is LTL, after 2014-12-31 is EUR. - `order_info` (string) Order information. - `testing` (string) If testing is set to Y, then testing will take place (no real deals will be made). - `first_name` (string) Customer first name. - `last_name` (string) Customer last name. - `client_phone` (string) Customer phone number. - `client_email` (string) Customer email address. - `client_address` (string) Customer address. - `pers_code` (string) Customer personal code. - `doc_type` (string) Identity document types: - PP - Passport - AK - Identity card Enum: "PP", "AK" - `doc_no` (string) Customer document number. - `vendor_phone` (string) Vendor/E-shop phone number. - `vendor_email` (string) E-shop info e-mail. - `vendor_name` (string) Vendor/E-shop name. - `vendor_img` (string) Internet link to E-shop logo image - `order_json` (object, required) Shopping cart expressed in JSON array. - `order_json.name` (string) For example: Lygintuvas - `order_json.category` (string) For example: B - `order_json.price` (string) For example: 113.56 - `order_json.quantity` (number) For example: 1 ## Response 200 fields (application/json): - `appl_token` (string) Unique application token. - `error_code` (string) Error code: - AUTHENTICATION_FAILURE - WRONG_RETURN_URL - WRONG_ORDER_ID - `error_message` (string) Error description: - API key incorrect - Return url entered is incorrect - Order id entered is incorrect - `redirect_url` (string) Redirect URL. - `errors` (array) System errors back trace list. ## Response 401 fields (application/json): - `message` (string) Unauthorized Example: "unauthorized" ## Response 404 fields (application/json): - `message` (string) Not Found Example: "not_found" ## Response 422 fields (application/json): - `message` (string) Unprocessable Entity