{"info":{"_postman_id":"d22b827e-20e8-45f0-881a-3cd661ce00ad","name":"GraphQL Order Attribute","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"10589000","collectionId":"d22b827e-20e8-45f0-881a-3cd661ce00ad","publishedId":"Szf539EJ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-04-17T08:03:03.000Z"},"item":[{"name":"Get Order Attribute","id":"b6f8e604-355a-4834-8e47-d491e99a7ede","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query{\r\n  MpOrderAttributes{\r\n    items {\r\n      additional_data\r\n      allow_extensions\r\n      attribute_code\r\n      attribute_id\r\n      backend_type\r\n      created_at\r\n      customer_group\r\n      default_value\r\n      field_depend\r\n      frontend_class\r\n      frontend_input\r\n      frontend_label\r\n      input_filter\r\n      is_required\r\n      is_used_in_grid\r\n      labels\r\n      max_file_size\r\n      options\r\n      position\r\n      shipping_depend\r\n      show_in_frontend_order\r\n      sort_order\r\n      store_id\r\n      tooltips\r\n      updated_at\r\n      use_tooltip\r\n      value_depend\r\n    }\r\n    total_count\r\n  }\r\n}","variables":""}},"url":"{{magento_base_url}}/graphql","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"75ebe779-f9cc-4f08-a899-1c620339d094","name":"Get Order Attribute Example","originalRequest":{"method":"POST","header":[],"body":{"mode":"graphql","graphql":{"query":"query{\r\n  MpOrderAttributes{\r\n    items {\r\n      additional_data\r\n      allow_extensions\r\n      attribute_code\r\n      attribute_id\r\n      backend_type\r\n      created_at\r\n      customer_group\r\n      default_value\r\n      field_depend\r\n      frontend_class\r\n      frontend_input\r\n      frontend_label\r\n      input_filter\r\n      is_required\r\n      is_used_in_grid\r\n      labels\r\n      max_file_size\r\n      options\r\n      position\r\n      shipping_depend\r\n      show_in_frontend_order\r\n      sort_order\r\n      store_id\r\n      tooltips\r\n      updated_at\r\n      use_tooltip\r\n      value_depend\r\n    }\r\n    total_count\r\n  }\r\n}","variables":""}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 27 Apr 2020 09:50:05 GMT"},{"key":"Server","value":"Apache/2.4.38 (Ubuntu)"},{"key":"Expires","value":"Sat, 27 Apr 2019 09:50:06 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=7342s7fj6n0fksjf3a3u30hmf8; expires=Mon, 27-Apr-2020 10:50:06 GMT; Max-Age=3600; path=/api/api2; domain=dev.mageplaza.vn; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=8a45933ba2c6b45e3abe9fdaa1bdf440; expires=Thu, 25-Apr-2030 09:50:06 GMT; Max-Age=315360000; path=/"},{"key":"Set-Cookie","value":"private_content_version=61def09f5c32c554726554a2418bd938; expires=Thu, 25-Apr-2030 09:50:06 GMT; Max-Age=315360000; path=/"},{"key":"Set-Cookie","value":"private_content_version=e2991fb5125ce1f12aca11155ec46352; expires=Thu, 25-Apr-2030 09:50:06 GMT; Max-Age=315360000; path=/"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"2752"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"MpOrderAttributes\": {\n            \"items\": [\n                {\n                    \"additional_data\": null,\n                    \"allow_extensions\": null,\n                    \"attribute_code\": \"text_field\",\n                    \"attribute_id\": 1,\n                    \"backend_type\": \"varchar\",\n                    \"created_at\": \"2020-04-27 08:40:25\",\n                    \"customer_group\": \"0,1,2,3\",\n                    \"default_value\": null,\n                    \"field_depend\": 0,\n                    \"frontend_class\": null,\n                    \"frontend_input\": \"text\",\n                    \"frontend_label\": \"Text field\",\n                    \"input_filter\": null,\n                    \"is_required\": 0,\n                    \"is_used_in_grid\": 1,\n                    \"labels\": \"{\\\"1\\\":\\\"mageplaza 1\\\",\\\"2\\\":\\\"mageplaza 2\\\"}\",\n                    \"max_file_size\": 0,\n                    \"options\": null,\n                    \"position\": \"2\",\n                    \"shipping_depend\": null,\n                    \"show_in_frontend_order\": 1,\n                    \"sort_order\": 0,\n                    \"store_id\": \"0\",\n                    \"tooltips\": \"{\\\"1\\\":\\\"\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"updated_at\": \"2020-04-27 09:44:09\",\n                    \"use_tooltip\": 0,\n                    \"value_depend\": null\n                },\n                {\n                    \"additional_data\": null,\n                    \"allow_extensions\": null,\n                    \"attribute_code\": \"media_image\",\n                    \"attribute_id\": 2,\n                    \"backend_type\": \"text\",\n                    \"created_at\": \"2020-04-27 08:41:16\",\n                    \"customer_group\": \"0,1,2,3\",\n                    \"default_value\": null,\n                    \"field_depend\": 0,\n                    \"frontend_class\": null,\n                    \"frontend_input\": \"image\",\n                    \"frontend_label\": \"Media Image\",\n                    \"input_filter\": null,\n                    \"is_required\": 0,\n                    \"is_used_in_grid\": 1,\n                    \"labels\": \"{\\\"1\\\":\\\"\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"max_file_size\": 0,\n                    \"options\": null,\n                    \"position\": \"4\",\n                    \"shipping_depend\": null,\n                    \"show_in_frontend_order\": 1,\n                    \"sort_order\": 0,\n                    \"store_id\": \"0\",\n                    \"tooltips\": \"{\\\"1\\\":\\\"\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"updated_at\": \"2020-04-27 08:55:30\",\n                    \"use_tooltip\": 0,\n                    \"value_depend\": null\n                },\n                {\n                    \"additional_data\": null,\n                    \"allow_extensions\": null,\n                    \"attribute_code\": \"text_area\",\n                    \"attribute_id\": 3,\n                    \"backend_type\": \"text\",\n                    \"created_at\": \"2020-04-27 09:07:17\",\n                    \"customer_group\": \"0,1,2,3\",\n                    \"default_value\": null,\n                    \"field_depend\": 0,\n                    \"frontend_class\": null,\n                    \"frontend_input\": \"textarea\",\n                    \"frontend_label\": \"Text Area\",\n                    \"input_filter\": null,\n                    \"is_required\": 1,\n                    \"is_used_in_grid\": 1,\n                    \"labels\": \"{\\\"1\\\":\\\"\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"max_file_size\": 0,\n                    \"options\": null,\n                    \"position\": \"2\",\n                    \"shipping_depend\": null,\n                    \"show_in_frontend_order\": 1,\n                    \"sort_order\": 0,\n                    \"store_id\": \"0\",\n                    \"tooltips\": \"{\\\"1\\\":\\\"\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"updated_at\": \"2020-04-27 09:07:17\",\n                    \"use_tooltip\": 1,\n                    \"value_depend\": null\n                },\n                {\n                    \"additional_data\": \"{\\\"option_0\\\":{\\\"swatch_value\\\":\\\"#b837b8\\\",\\\"swatch_type\\\":1},\\\"option_1\\\":{\\\"swatch_value\\\":\\\"#00e3e3\\\",\\\"swatch_type\\\":1}}\",\n                    \"allow_extensions\": null,\n                    \"attribute_code\": \"single_select_with_image\",\n                    \"attribute_id\": 4,\n                    \"backend_type\": \"varchar\",\n                    \"created_at\": \"2020-04-27 09:45:30\",\n                    \"customer_group\": \"0,1,2,3\",\n                    \"default_value\": null,\n                    \"field_depend\": 0,\n                    \"frontend_class\": null,\n                    \"frontend_input\": \"select_visual\",\n                    \"frontend_label\": \"Single select with image\",\n                    \"input_filter\": null,\n                    \"is_required\": 1,\n                    \"is_used_in_grid\": 1,\n                    \"labels\": \"{\\\"1\\\":\\\"image\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"max_file_size\": 0,\n                    \"options\": \"[]\",\n                    \"position\": \"6\",\n                    \"shipping_depend\": null,\n                    \"show_in_frontend_order\": 1,\n                    \"sort_order\": 0,\n                    \"store_id\": \"0\",\n                    \"tooltips\": \"{\\\"1\\\":\\\"select image\\\",\\\"2\\\":\\\"\\\"}\",\n                    \"updated_at\": \"2020-04-27 09:50:01\",\n                    \"use_tooltip\": 1,\n                    \"value_depend\": null\n                }\n            ],\n            \"total_count\": 4\n        }\n    }\n}"}],"_postman_id":"b6f8e604-355a-4834-8e47-d491e99a7ede"},{"name":"Save Order Attribute","id":"f1f79afa-0d04-4b2b-947d-2cdd12f981a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","type":"text","value":"Bearer {{customer_token}}"}],"body":{"mode":"graphql","graphql":{"query":"mutation OrderAttributes($cart_id: String!) {\r\n\tMpOrderAttributesSaveAttributes(\r\n\t\tinput: {\r\n\t\t\tcart_id: $cart_id\r\n\t\t\tattributes: [\r\n\t\t\t\t{ attribute_code: \"text_field\", value: \"abc\" }\r\n\t\t\t\t{\r\n\t\t\t\t\tattribute_code: \"media_image\"\r\n\t\t\t\t\tvalue: \"{\\n    \\\"error\\\": \\\"\\\",\\n    \\\"file\\\": \\\"/a/n/anh1.jpg\\\",\\n    \\\"name\\\": \\\"anh1.jpg\\\",\\n    \\\"size\\\": \\\"25432\\\",\\n    \\\"url\\\": \\\"http://dev.mageplaza.vn/api/api2/pub/media/mageplaza/order_attributes/tmp/a/n/anh1.jpg\\\"\\n}\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t)\r\n}","variables":"{\n   \"cart_id\":\"MvwZAWLOY8Z2un2nKbfmd6QV4osZ0Hi1\"\n}"}},"url":"{{magento_base_url}}/graphql","description":"<p>In order to upload the files for attributes such as Image and Single File Attachment, use request in Rest Api supported by Mageplaza Order Attribute.\nRead more at: <a href=\"https://documenter.getpostman.com/view/10589000/Szf5399x?version=latest#d6e817b3-26ce-4930-a287-e275f4ff74d6\">https://documenter.getpostman.com/view/10589000/Szf5399x?version=latest#d6e817b3-26ce-4930-a287-e275f4ff74d6</a></p>\n","urlObject":{"path":["graphql"],"host":["{{magento_base_url}}"],"query":[],"variable":[]}},"response":[{"id":"f4fadfd1-a5dd-4b17-ba0b-aa328d5ecca8","name":"Save Order Attribute Example","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"Bearer {{customer_token}}","type":"text"}],"body":{"mode":"graphql","graphql":{"query":"mutation OrderAttributes($cart_id: String!) {\r\n\tMpOrderAttributesSaveAttributes(\r\n\t\tinput: {\r\n\t\t\tcart_id: $cart_id\r\n\t\t\tattributes: [\r\n\t\t\t\t{ attribute_code: \"text_field\", value: \"abc\" }\r\n\t\t\t\t{\r\n\t\t\t\t\tattribute_code: \"media_image\"\r\n\t\t\t\t\tvalue: \"{\\n    \\\"error\\\": \\\"\\\",\\n    \\\"file\\\": \\\"/a/n/anh1.jpg\\\",\\n    \\\"name\\\": \\\"anh1.jpg\\\",\\n    \\\"size\\\": \\\"25432\\\",\\n    \\\"url\\\": \\\"http://dev.mageplaza.vn/api/api2/pub/media/mageplaza/order_attributes/tmp/a/n/anh1.jpg\\\"\\n}\"\r\n\t\t\t\t}\r\n\t\t\t]\r\n\t\t}\r\n\t)\r\n}","variables":"{\n   \"cart_id\":\"MvwZAWLOY8Z2un2nKbfmd6QV4osZ0Hi1\"\n}"}},"url":"{{magento_base_url}}/graphql"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 17 Apr 2020 07:34:38 GMT"},{"key":"Server","value":"Apache/2.4.38 (Ubuntu)"},{"key":"Expires","value":"Wed, 17 Apr 2019 07:34:38 GMT"},{"key":"Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"Pragma","value":"no-cache"},{"key":"Set-Cookie","value":"PHPSESSID=6jpctjj6ocglm41scttttlkcn4; expires=Fri, 17-Apr-2020 08:34:38 GMT; Max-Age=3600; path=/quynh/ce234; domain=dev.mageplaza.vn; HttpOnly"},{"key":"Set-Cookie","value":"private_content_version=c137d1c09a6a9a42b740e9beb342ff7a; expires=Mon, 15-Apr-2030 07:34:38 GMT; Max-Age=315360000; path=/"},{"key":"X-Magento-Cache-Control","value":"max-age=0, must-revalidate, no-cache, no-store"},{"key":"X-Magento-Tags","value":"FPC"},{"key":"X-Magento-Cache-Debug","value":"MISS"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"Content-Length","value":"49"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json"}],"cookie":[],"responseTime":null,"body":"{\n    \"data\": {\n        \"MpOrderAttributesSaveAttributes\": true\n    }\n}"}],"_postman_id":"f1f79afa-0d04-4b2b-947d-2cdd12f981a8"}]}