### Cancellation example (multipart/form-data) multiple products Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation example with multiple products using multipart/form-data. Send repeated -F parameters for each product. ```bash curl --header "Authorization: Api-Key " -F "order_id=3453" -F "product_ids=98734" -F "product_ids=81273" -F "product_ids=512312" -F "variation_ids=98734-L" -F "variation_ids=81273-M" -F "variation_ids=512312-42" -F "date=2017-09-12" -F "ecomm_size=L" -F "ecomm_size=M" -F "ecomm_size=42" -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### Install React Native module Source: https://help3.usizy.com/integration/mobile/react-native Run this command in your project folder after moving the downloaded module to install it. ```bash user@ip: $ npm install react-native-usizy-0.1.6.tgz ``` -------------------------------- ### Cancellation example (application/x-www-form-urlencoded) multiple products Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation example with multiple products using application/x-www-form-urlencoded. Send repeated product_ids, variation_ids, and ecomm_size parameters for each product. ```bash curl --header "Authorization: Api-Key " --data "order_id=3453&product_ids=98734&product_ids=81273&product_ids=512312&variation_ids=98734-L&variation_ids=81273-M&variation_ids=512312-42&date=2017-09-12&ecomm_size=L&ecomm_size=M&ecomm_size=42" -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### Size Adviser API call script example Source: https://help3.usizy.com/integration/enable-size-adviser/size-adviser-api-call-script-example Complete HTML example showing how to add the Size Adviser div with data attributes in the body and the platform script in the footer. ```html
...
...
... ``` -------------------------------- ### Cancellation example (multipart/form-data) Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation example using multipart/form-data for a single product. Each field is sent as a separate -F parameter. ```bash curl --header "Authorization: Api-Key " -F "order_id=3453" -F "product_ids=98734" -F "variation_ids=98734-L" -F "date=2017-09-12" -F "ecomm_size=L" -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### Install Pods via Terminal Source: https://help3.usizy.com/integration/mobile/integration-for-ios Run this command in your project folder after updating your Podfile to install the dependencies. ```bash pod install ``` -------------------------------- ### Install UsizyIosSdk via Podfile Source: https://help3.usizy.com/integration/mobile/integration-for-ios Add the UsizyIosSdk dependency to your Podfile to include the library in your project. ```ruby pod 'UsizyIosSdk', :git => 'https://bitbucket.org/usizy/usizy-ios-sdk.git', :tag => '0.10.0' ``` -------------------------------- ### Cancellation example (application/json) Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation example using application/json for a single product. The request body is a JSON object with arrays for product_ids, variation_ids, and ecomm_size. ```bash curl --header "Authorization: Api-Key " --header "Content-Type: application/json" --data '{ "order_id": "3453", "date": "2017-09-12", "product_ids": ["98734"], "variation_ids": ["98734-L"], "ecomm_size": ["L"]}' -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### Cancellation example (application/json) multiple products Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation example with multiple products using application/json. The request body includes arrays for product_ids, variation_ids, and ecomm_size for each product. ```bash curl --header "Authorization: Api-Key " --header "Content-Type: application/json" -d '{ "order_id": "3453", "date": "2017-09-12", "product_ids": ["98734", "81273", "512312"], "variation_ids": ["98734-L", "81273-M", "512312-42"], "ecomm_size": ["L","M","42"]}' -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### Cancellation example (application/x-www-form-urlencoded) Source: https://help3.usizy.com/integration/share-your-sales-cancellations/cancellations-integration-api-example Cancellation confirmation example using application/x-www-form-urlencoded. Replace with your actual API key. Sends a single product cancellation for order 3453. ```bash curl --header "Authorization: Api-Key " --data "order_id=3453&product_ids=98734&variation_ids=98734-L&date=2017-09-12&ecomm_size=L" -X POST https://usizy.com/api/v2/event/cancel ``` -------------------------------- ### XML feed example with essential and additional variables Source: https://help3.usizy.com/integration/share-your-product-feed/completed-feed-example Complete XML feed example showing product variations with essential and additional variables. Includes tags from Google Shopping Feed, but custom tags are allowed. Demonstrates multiple product rows with variations. ```XML 1202680 1202680L Nike Long sleeved T-shirt Men Designed from a soft brushed cotton jersey, this long-sleeved top can be worn on its own or layered on cooler days L INT Clothing & Accessories > T-shirts T-shirt Male Adult https://your_ecommerce.com/products/1202680 https://your_ecommerce.com/images/1202680.jpg your_ecommerce 42 EUR 2 954236 https://your_ecommerce.com/size_chart/1202680.jpg 2019-02-11T13:16:45+01:00 1202680 1202680M Nike Long sleeved T-shirt Men Designed from a soft brushed cotton jersey, this long-sleeved top can be worn on its own or layered on cooler days M INT Clothing & Accessories > T-shirts T-shirt Male Adult https://your_ecommerce.com/products/1202680 https://your_ecommerce.com/images/1202680.jpg your_ecommerce 42 EUR 5 59025557 https://your_ecommerce.com/size_chart/1202680.jpg 2019-02-11T13:16:45+01:00 1202680 1202680XL Nike Long sleeved T-shirt Men Designed from a soft brushed cotton jersey, this long-sleeved top can be worn on its own or layered on cooler days XL INT Clothing & Accessories > T-shirts T-shirt Male Adult https://your_ecommerce.com/products/1202680 https://your_ecommerce.com/images/1202680.jpg your_ecommerce 42 EUR 1 59025557 https://your_ecommerce.com/size_chart/1202680.jpg 2019-02-11T13:16:45+01:00 2234224 2234224M Adidas Long jacket Unisex Designed from a soft brushed cotton jersey, this long-sleeved top can be worn on its own or layered on cooler days M INT Clothing & Accessories > Jacket Jacket< Unisex Adult https://your_ecommerce.com/products/2234224 https://your_ecommerce.com/images/2234224.jpg your_ecommerce 42 EUR 1 77646678 https://your_ecommerce.com/size_chart/2234224.jpg 2019-02-11T13:16:45+01:00 ``` -------------------------------- ### Integration with user's data Source: https://help3.usizy.com/smart-assistant/onboarding-guide/enable-smart-assistant/integration-examples Use this example to integrate Smart Assistant by passing user data directly via parameters. The snippet includes the launcher script and the smart-assistant element with api-key, user-id, product-id, language, first-name, last-name, and zip-code attributes. ```html ... ... ... ... ``` -------------------------------- ### XML Feed Example for Usizy Source: https://help3.usizy.com/integration/share-your-product-feed/building-your-feed A minimal XML feed structure for Usizy. It includes essential variables such as unique_product_id, variation_id, brand, title, description, size, size_system, google_product_category, product_type, gender, age_group, link, image_link, ecommerce_name, price, currency, availability, gtin, guide_link, and updated. Use this as a starting point for building your product feed. ```xml unique_product_identifier, item_group_id, UPC, EAN, ISBN, MPN, Parent SKU, ... product_variation_id (size, color, etc.) product_brand product_title product_description product_size product_size_system (INT, EU, US, UK, etc.) product_category product_type gender age_group product_url_here product_image_url_here your_ecommerce product_price currency stock_availability global_trade_item_number size_guide_url_here datetime_update ``` -------------------------------- ### Integration with user-id Source: https://help3.usizy.com/smart-assistant/onboarding-guide/enable-smart-assistant/integration-examples Use this example to integrate Smart Assistant by providing a user ID, which will be used to access the user's data through the eCommerce API. The snippet includes the launcher script and the smart-assistant element with api-key, product-id, language, and user-id attributes. ```html ... ... ... ... ``` -------------------------------- ### Initialize the API call Source: https://help3.usizy.com/integration/enable-size-adviser/script-manual-launch Once the variables and script appear in your pre, initialize the API call using the window.uSizy.init() command. ```JavaScript window.uSizy.init() ``` -------------------------------- ### Handle onRecommendedSize event Source: https://help3.usizy.com/integration/mobile/react-native Associate a function to the onRecommendedSize event to receive the recommendation. The example shows a state setter for sizeCountry. ```javascript const [sizeCountry, setSizeCountry] = useState(true); const _onRecommendedSize = (data) => { setSizeCountry(data.nativeEvent.sizeCountry); }; ``` -------------------------------- ### Authorization header example Source: https://help3.usizy.com/integration/share-your-returns/returns-api-integration-recommended Shows the format for the Authorization header required for API authentication. The api_key must be prepended with 'Api-Key '. ```http Authorization: Api-Key 401f7ac837da42b97f ```