[{"name":"post-auth-token","description":"Get an access token. Exchanges a seller's MPL and its partner's paymeclientkey for an access token and a refresh token. Send the access token as Authorization: Bearer <authtoken on every product and customer call. Only partners can get a token: the seller in mpl must belong to the partner whose key you send in key.","parameters":{"type":"object","properties":{"body":{"type":"object","properties":{"mpl":{"type":"string","description":"The seller's MPL (`seller_payme_id`), e.g. `MPLDEMO-MPLDEMO-MPLDEMO-1234567`. The token acts for this seller."},"key":{"type":"string","description":"The partner's `payme_client_key`. The seller in `mpl` must belong to this partner."}},"required":["mpl","key"],"description":"The seller and partner credentials."}},"required":["body"]},"x-payme":{"method":"POST","path":"/auth-tokens","operationId":"post-auth-token","baseUrl":"https://payme-store-staging.payme.io/api"}},{"name":"post-auth-refresh","description":"Refresh an access token. Exchanges a refresh token for a new access token and a new refresh token. The refresh token you send stops working, so store the new one. The refresh token identifies the seller, so the call needs no Authorization, PayMe-Partner-Key or PayMe-Merchant-Key header.","parameters":{"type":"object","properties":{"body":{"type":"object","properties":{"refresh_token":{"type":"string","description":"The `refresh_token` from your last `POST /auth-tokens` or `POST /refresh-exchanges` call. Each refresh token works once."}},"required":["refresh_token"],"description":"The refresh token to exchange."}},"required":["body"]},"x-payme":{"method":"POST","path":"/refresh-exchanges","operationId":"post-auth-refresh","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"partnerKey":[],"merchantKey":[]}],"securitySchemes":{"partnerKey":{"type":"apiKey","in":"header","name":"PayMe-Partner-Key"},"merchantKey":{"type":"apiKey","in":"header","name":"PayMe-Merchant-Key"}},"credentials":[{"name":"refresh_token","in":"body","required":true}]}},{"name":"get-products","description":"List products. Lists the seller's products, one page at a time. page and itemsperpage are required. Filter by status, text, your own product id, store currency, store price or creation date, and sort by name, status or creation date. Without sortby the order isn't defined.","parameters":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, from `1`.","in":"query"},"items_per_page":{"type":"integer","description":"Products per page, from `1` to `100`.","in":"query"},"status":{"type":"integer","description":"`1` – available, `0` – unavailable, `-1` – draft.","in":"query"},"search":{"type":"string","description":"Case-insensitive text to find in the name or the description.","in":"query"},"name":{"type":"string","description":"Case-insensitive text to find in the name, 2–100 characters.","in":"query"},"description":{"type":"string","description":"Case-insensitive text to find in the description, 2–100 characters.","in":"query"},"product_remote_id":{"type":"string","description":"Your own product id, exact match.","in":"query"},"currency":{"type":"string","description":"ISO 4217 code (e.g. `ILS`) of the store price including VAT.","in":"query"},"price[min]":{"type":"number","description":"Lowest store price including VAT, in major units.","in":"query"},"price[max]":{"type":"number","description":"Highest store price including VAT, in major units.","in":"query"},"created_at[from]":{"type":"string","description":"Created at or after this time: `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`.","in":"query"},"created_at[to]":{"type":"string","description":"Created at or before this time, in the same formats.","in":"query"},"sort_by":{"type":"string","description":"`name`, `status` or `created_at`.","in":"query"},"sort_direction":{"type":"string","description":"`asc` or `desc`. Default `desc`. Applies only together with `sort_by`.","in":"query"}},"required":["page","items_per_page"]},"x-payme":{"method":"GET","path":"/products","operationId":"get-products","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"get-products-guid","description":"Get a product. Returns one of the seller's products by its guid. A product that doesn't exist, was deleted or belongs to another seller returns 404. Send Authorization: Bearer <authtoken, the token from POST /auth-tokens. Hosts, tokens and the error format: Hosts, authentication and errors.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The product `guid` (a UUID) that `POST /products` returned. Any other format returns `400`.","in":"path"}},"required":["guid"]},"x-payme":{"method":"GET","path":"/products/{guid}","operationId":"get-products-guid","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"patch-products-product-id","description":"Update a product. Changes some fields of one of the seller's products. Fields you don't send keep their values. A price object you send (storeprices or costs) replaces the stored one entirely. The request names the price objects storeprices and costs; responses name them storeconfiguration and costsdetails.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The product `guid` (a UUID) that `POST /products` returned. Any other format returns `400`.","in":"path"},"body":{"type":"object","properties":{"product_remote_id":{"type":"string","description":"Your own product id, 2–100 characters, unique among the seller's products (`409` otherwise). Send it only to change it: resending the product's current value also returns `409`."},"name":{"type":"string","description":"Product name, 2–100 characters."},"status":{"type":"integer","description":"`1` – available, `0` – unavailable, `-1` – draft."},"description":{"type":"string","description":"Product description, at least 2 characters."},"store_prices":{"type":"object","description":"Selling price. Replaces the stored selling price entirely: send `is_vat_free` and both prices together. Returned as `store_configuration`. The `currency` and `price[min]`/`price[max]` filters of `GET /products` match its `price_include_vat`.","properties":{"is_vat_free":{"type":"boolean","description":"`true` if the product is exempt from VAT."},"price_without_vat":{"type":"object","description":"Price before VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]},"price_include_vat":{"type":"object","description":"Price including VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]}}},"costs":{"type":"object","description":"Your cost for the product, same shape as `store_prices`. Replaces the stored cost entirely. Returned as `costs_details`.","properties":{"is_vat_free":{"type":"boolean","description":"`true` if the product is exempt from VAT."},"price_without_vat":{"type":"object","description":"Price before VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]},"price_include_vat":{"type":"object","description":"Price including VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]}}}},"description":"The fields to change."}},"required":["guid"]},"x-payme":{"method":"PATCH","path":"/products/{guid}","operationId":"patch-products-product-id","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"delete-products-guid","description":"Delete a product. Deletes one of the seller's products. Deleted products no longer appear in lists or reads, and their guid returns 404. The call has no request body and returns 204 No Content. Send Authorization: Bearer <authtoken, the token from POST /auth-tokens.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The product `guid` (a UUID) that `POST /products` returned. Any other format returns `400`.","in":"path"}},"required":["guid"]},"x-payme":{"method":"DELETE","path":"/products/{guid}","operationId":"delete-products-guid","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"post-user","description":"Create a product. Adds a product to the seller's catalogue. name, status and storeprices are required. The response returns the new product's guid; use it with /products/{guid}. The request names the price objects storeprices and costs; responses name them storeconfiguration and costsdetails.","parameters":{"type":"object","properties":{"body":{"type":"object","properties":{"product_remote_id":{"type":"string","description":"Your own product id, 2–100 characters, unique among the seller's products (`409` otherwise)."},"name":{"type":"string","description":"Product name, 2–100 characters."},"status":{"type":"integer","description":"`1` – available, `0` – unavailable, `-1` – draft."},"description":{"type":"string","description":"Product description, at least 2 characters."},"store_prices":{"type":"object","description":"Selling price. Returned as `store_configuration`. The `currency` and `price[min]`/`price[max]` filters of `GET /products` match its `price_include_vat`.","properties":{"is_vat_free":{"type":"boolean","description":"`true` if the product is exempt from VAT."},"price_without_vat":{"type":"object","description":"Price before VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]},"price_include_vat":{"type":"object","description":"Price including VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]}}},"costs":{"type":"object","description":"Your cost for the product, same shape as `store_prices`. Returned as `costs_details`.","properties":{"is_vat_free":{"type":"boolean","description":"`true` if the product is exempt from VAT."},"price_without_vat":{"type":"object","description":"Price before VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]},"price_include_vat":{"type":"object","description":"Price including VAT.","properties":{"amount":{"type":"number","description":"Decimal amount in major units, e.g. `99.99`."},"currency":{"type":"string","description":"ISO 4217 currency code, e.g. `ILS`."}},"required":["amount","currency"]}}}},"required":["name","status","store_prices"],"description":"The product to create."}},"required":["body"]},"x-payme":{"method":"POST","path":"/products","operationId":"post-user","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"get-customers","description":"List customers. Lists the seller's customers, one page at a time. page and itemsperpage are required. Filter by status, name, email, phone or creation date, or search across the names, the email and the guid. Sort by first name, last name, email or creation date; without sortby the order isn't defined.","parameters":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, from `1`.","in":"query"},"items_per_page":{"type":"integer","description":"Customers per page, from `1` to `100`.","in":"query"},"status":{"type":"integer","description":"`0` – inactive, `1` – active, `2` – draft.","in":"query"},"search":{"type":"string","description":"Case-insensitive text to find in the first, middle or last name, the full name, the `guid` or the email.","in":"query"},"first_name":{"type":"string","description":"First name, exact match.","in":"query"},"last_name":{"type":"string","description":"Last name, exact match.","in":"query"},"email":{"type":"string","description":"Email address, exact match.","in":"query"},"mobile_number":{"type":"string","description":"Phone number, exact match against the main or the additional phone.","in":"query"},"created_at[from]":{"type":"string","description":"Created at or after this time: `YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`.","in":"query"},"created_at[to]":{"type":"string","description":"Created at or before this time, in the same formats.","in":"query"},"sort_by":{"type":"string","description":"`first_name`, `last_name`, `email` or `created_at`.","in":"query"},"sort_direction":{"type":"string","description":"`asc` or `desc`. Default `desc`. Applies only together with `sort_by`.","in":"query"}},"required":["page","items_per_page"]},"x-payme":{"method":"GET","path":"/customers","operationId":"get-customers","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"post-customers","description":"Create a customer. Adds a customer to the seller's customer list. firstname, lastname, email, phone and status are required. The response returns the new customer's guid; use it with /customers/{guid}.","parameters":{"type":"object","properties":{"body":{"type":"object","properties":{"customer_external_id":{"type":"string","description":"Your own customer id, unique among the seller's customers (`409` otherwise). It isn't returned when you read the customer."},"first_name":{"type":"string","description":"First name, at least 2 characters."},"middle_name":{"type":"string","description":"Middle name, at least 2 characters."},"last_name":{"type":"string","description":"Last name, at least 2 characters."},"email":{"type":"string","description":"A valid email address."},"phone":{"type":"string","description":"Main phone number, 3–20 characters. Returned as `phone_number`."},"additional_phone":{"type":"string","description":"Second phone number, 3–20 characters. Returned as `additional_phone_number`."},"company_name":{"type":"string","description":"Company name, at least 2 characters."},"country":{"type":"string","description":"Country, at least 2 characters. Returned inside `address`."},"city":{"type":"string","description":"City, at least 2 characters. Returned inside `address`."},"street":{"type":"string","description":"Street, at least 2 characters. Returned inside `address`."},"building_number":{"type":"string","description":"Building number, e.g. `12` or `12A`. Returned inside `address`."},"floor":{"type":"string","description":"Floor, at least 1 character. Returned inside `address`."},"zip":{"type":"string","description":"Postal code. Returned inside `address`."},"description":{"type":"string","description":"Your note about the customer."},"birthday":{"type":"string","description":"Date of birth, `YYYY-MM-DD`."},"status":{"type":"integer","description":"`0` – inactive, `1` – active, `2` – draft."},"payment_tokens":{"type":"array","description":"Payment tokens to save for the customer.","items":{"type":"object","properties":{"token":{"type":"string","description":"The payment token to save. PayMe stores it as given."},"token_data":{"type":"string","description":"A JSON object encoded as a string, e.g. the card mask and brand: `{\"card_mask\":\"4580 **** **** 0000\",\"card_brand\":\"visa\"}`. Must be valid JSON."}},"required":["token"]}}},"required":["first_name","last_name","email","phone","status"],"description":"The customer to create."}},"required":["body"]},"x-payme":{"method":"POST","path":"/customers","operationId":"post-customers","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"get-customers-guid","description":"Get a customer. Returns one of the seller's customers by its guid. A customer that doesn't exist, was deleted or belongs to another seller returns 404. Send Authorization: Bearer <authtoken, the token from POST /auth-tokens. Hosts, tokens and the error format: Hosts, authentication and errors.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The customer `guid` (a UUID) that `POST /customers` returned. Any other format returns `400`.","in":"path"}},"required":["guid"]},"x-payme":{"method":"GET","path":"/customers/{guid}","operationId":"get-customers-guid","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"patch-customers","description":"Update a customer. Changes some fields of one of the seller's customers. Fields you don't send, or send empty, keep their values. A paymenttokens array you send replaces all of the customer's saved tokens.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The customer `guid` (a UUID) that `POST /customers` returned. Any other format returns `400`.","in":"path"},"body":{"type":"object","properties":{"customer_external_id":{"type":"string","description":"Your own customer id, unique among the seller's customers (`409` otherwise). It isn't returned when you read the customer. Send it only to change it: resending the customer's current value also returns `409`."},"first_name":{"type":"string","description":"First name, at least 2 characters."},"middle_name":{"type":"string","description":"Middle name, at least 2 characters."},"last_name":{"type":"string","description":"Last name, at least 2 characters."},"email":{"type":"string","description":"A valid email address."},"phone":{"type":"string","description":"Main phone number, 3–20 characters. Returned as `phone_number`."},"additional_phone":{"type":"string","description":"Second phone number, 3–20 characters. Returned as `additional_phone_number`."},"company_name":{"type":"string","description":"Company name, at least 2 characters."},"country":{"type":"string","description":"Country, at least 2 characters. Returned inside `address`."},"city":{"type":"string","description":"City, at least 2 characters. Returned inside `address`."},"street":{"type":"string","description":"Street, at least 2 characters. Returned inside `address`."},"building_number":{"type":"string","description":"Building number, e.g. `12` or `12A`. Returned inside `address`."},"floor":{"type":"string","description":"Floor, at least 1 character. Returned inside `address`."},"zip":{"type":"string","description":"Postal code. Returned inside `address`."},"description":{"type":"string","description":"Your note about the customer."},"status":{"type":"integer","description":"`1` – active, `2` – draft. This call can't set `0` (inactive)."},"payment_tokens":{"type":"array","description":"Payment tokens to save for the customer. The array replaces all of the customer's saved tokens.","items":{"type":"object","properties":{"token":{"type":"string","description":"The payment token to save. PayMe stores it as given."},"token_data":{"type":"string","description":"A JSON object encoded as a string, e.g. the card mask and brand: `{\"card_mask\":\"4580 **** **** 0000\",\"card_brand\":\"visa\"}`. Must be valid JSON."}},"required":["token"]}}},"description":"The fields to change."}},"required":["guid"]},"x-payme":{"method":"PATCH","path":"/customers/{guid}","operationId":"patch-customers","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}},{"name":"delete-customers","description":"Delete a customer. Deletes one of the seller's customers. Deleted customers no longer appear in lists or reads, and their guid returns 404. The call has no request body and returns 204 No Content. Send Authorization: Bearer <authtoken, the token from POST /auth-tokens.","parameters":{"type":"object","properties":{"guid":{"type":"string","description":"The customer `guid` (a UUID) that `POST /customers` returned. Any other format returns `400`.","in":"path"}},"required":["guid"]},"x-payme":{"method":"DELETE","path":"/customers/{guid}","operationId":"delete-customers","baseUrl":"https://payme-store-staging.payme.io/api","security":[{"bearerAuth":[]}],"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}]