{"id":901,"date":"2024-10-01T14:54:58","date_gmt":"2024-10-01T14:54:58","guid":{"rendered":"https:\/\/api-users.4over.com\/?page_id=901"},"modified":"2024-10-14T17:31:34","modified_gmt":"2024-10-14T17:31:34","slug":"direct-mail-create-order","status":"publish","type":"page","link":"https:\/\/api-users.4over.com\/?page_id=901","title":{"rendered":"Direct Mail Create Order"},"content":{"rendered":"<h3>POST New Orders<\/h3>\n<p>This route submits a new Direct Mail order and places it in User&#8217;s shopping cart. An order is consisted of one or more jobs. Each job is constructed by series of UUIDs and shipping data. Ship_from address is required when a job is drop-shipped.<br \/>\nAll files must be identified by appropriate file-reason code. For more details about files and file reason codes please see Services\/File Services section.<\/p>\n<h3>Resource URI<\/h3>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\nPOST  \/orders\n\n\nInput Parameters\n\n\n@param order_id {String} order_id specified by the API user. (Required)\n@param is_test_order {boolean} allows the user to submit test orders. Orders with is_test_order set to TRUE will not go to production. (Optional and default is set to FALSE)\n@param coupon_code {string} allows user to pass a coupon-code that will apply to any resources qualified in the order based on coupon rules. Only one coupon per order is allowed (Optional)\n@param skip_conformation {boolean} By setting this flag to TRUE the system will bypass conformation. If the flag is set to FALSE, an e-mail containing a HTML preview link is emailed to the authenticated user.  (Optional and default set to FALSE)\n@param job_name {string} Job name. (Required)\n@param product_uuid {uuid} UUID of product. (Required)\n@param runsize_uuid {uuid} UUID of runsize option. (Required)\n@param turnaroundtime_uuid {uuid} UUID of product. (Optional - If not submitted, shortest free tunraround time will be selected)\n@param colorspec_uuid {uuid} UUID of colorspec option. (Required)\n@param option_uuids {uuid} array of option UUIDs to specify any options that may be required or optional. (Required field but can be empty array)\n@param dropship {boolean} flag to identify if the job is being drop shipped. (Required)\n@param skip_files {boolean} allows order submission without files. Files can be submitted later when the order comes in with this falg set to TRUE. (Optional)\n@param files {string} URI to location of files or UUID of files POST-ed to 4over server. If skip_files is set to TRUE this parameter can be omitted. (Optional)\n@param company {string} Ship_to Company Name. (Required if firstname and lastname are not provided)\n@param firstname {string} Ship_to First Name. (Required if company is not provided)\n@param lastname {string} Ship_to Last Name. (Required if company is not provided)\n@param email {string} Ship_to Email. (optional)\n@param phone {string} Ship_to Phone Number. (Required)\n@param address {string} Ship_to address line. (Required)\n@param address2 {string} Ship_to address2 line. (Optional)\n@param city {string} Ship_to city. (Required)\n@param state {string} Ship_to state. (Required)\n@param zipcode {string} Ship-to zipcode. (Required)\n@param country {string} Ship_to country. (Required)\n@param company {string} Ship_from Company Name. (Required if ship-from present and firstname and lastname are not provided)\n@param firstname {string} Ship_from First Name. (Required if ship-from present and company is not provided)\n@param lastname {string} Ship_from Last Name. (Required if ship-from present and company is not provided)\n@param email {string} Ship_from Email. (optional if ship-from is present)\n@param phone {string} Ship_from Phone Number. (Required if ship-from is present)\n@param address {string} Ship_from address line. (Required if ship-from is present)\n@param address2 {string} Ship_from address2 line. (optional if ship-from is present)\n@param city {string} Ship_from city. (Required if ship-from is present)\n@param state {string} Ship_from state. (Required if ship-from is present)\n@param zipcode {string} Ship_from zipcode. (Required if ship-from is present)\n@param country {string} Ship_from country. (Required if ship-from is present)\n@param ship_from_facility {string} Facility code of the production facility where the job will be shipped from. (RECOMMENDED to leave this parameter blank. Blank facility-code means to assign the closets facility to the Ship-to address that can produce the product\/options combination)\n@param direct_mailing {array} crid should be random number of 3-12 digits range, address_validation_level =&gt; none, CASS, NCOA.\n@param product_type {string} product_type should be direct_mail, if placing direct mail order.\n@param shipper {array} {&quot;shipping_method&quot;:&quot;MAILING - No Shipment&quot;, &quot;shipping_code&quot;: &quot;MAILING&quot;}, if placing direct mail order.\n\n<\/pre>\n<h3>Sample Request URI<\/h3>\n<p>html<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\nhttps:\/\/api.4over.com\/orders\n<\/pre>\n<h3>Sample Request Body<\/h3>\n<p>NOTE:<br \/>\nGroup-Shipping is available for same type products with the same stock, colorspec, coating and runsize. The base price route provides a &#8220;can_group_ship&#8221; flag to let users know what products are qualifid for group-shipping.<br \/>\nIn sample request bellow &#8220;job001-001&#8221; and &#8220;job001-002&#8221; are grouped together for group-shipping and &#8220;job002-001&#8221;, &#8220;job002-002&#8221; and &#8220;job002-003&#8221; are groupped as a separate group-shipping job.<\/p>\n<p>JSON<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n{\n  &quot;order_id&quot;: &quot;direct-mail-072624&quot;,\n  &quot;skip_confirmation&quot;: &quot;true&quot;,\n  &quot;is_test_order&quot;: &quot;true&quot;,\n  &quot;jobs&quot;: [\n    {\n      &quot;job_name&quot;: &quot;direct-mail-4&quot;,\n      &quot;product_uuid&quot;: &quot;f80f1f73-2b5f-44ce-8d93-195852e8570b&quot;,\n      &quot;runsize_uuid&quot;: &quot;6237a36b-b046-4ef6-8fed-6cb9c22a5ece&quot;,\n      &quot;turnaround_uuid&quot;: &quot;ad290b77-c9d5-476c-b847-9ad4d25ae14e&quot;,\n      &quot;colorspec_uuid&quot;:&quot;32d3c223-f82c-492b-b915-ba065a00862f&quot;,\n      &quot;product_type&quot;: &quot;direct_mail&quot;,\n      &quot;dropship&quot;: true,\n      &quot;ship_to&quot;: {\n        &quot;company&quot;: null,\n        &quot;firstname&quot;: &quot;Test&quot;,\n        &quot;lastname&quot;: &quot;Admin&quot;,\n        &quot;email&quot;: &quot;testuser@user.com&quot;,\n        &quot;phone&quot;: &quot;18777822737&quot;,\n        &quot;address&quot;: &quot;3700 OAKCLIFF RD&quot;,\n        &quot;address2&quot;: &quot;&quot;,\n        &quot;city&quot;: &quot;ATLANTA&quot;,\n        &quot;state&quot;: &quot;GA&quot;,\n        &quot;zipcode&quot;: &quot;30340-3405&quot;,\n        &quot;country&quot;: &quot;US&quot;\n      },\n      &quot;ship_from&quot;: {\n        &quot;company&quot;: &quot;4over&quot;,\n        &quot;firstname&quot;: &quot;&quot;,\n        &quot;lastname&quot;: &quot;&quot;,\n        &quot;email&quot;: &quot;&quot;,\n        &quot;address&quot;: &quot;4621 Sperry Street&quot;,\n        &quot;address2&quot;: &quot;&quot;,\n        &quot;city&quot;: &quot;Los Angeles&quot;,\n        &quot;state&quot;: &quot;CA&quot;,\n        &quot;zipcode&quot;: &quot;90039&quot;,\n        &quot;country&quot;: &quot;US&quot;,\n        &quot;phone&quot;: &quot;555-555-5555&quot;\n      },\n      &quot;shipper&quot;: {\n        &quot;shipping_method&quot;: &quot;MAILING - No Shipment&quot;,\n        &quot;shipping_code&quot;: &quot;MAILING&quot;\n      },\n      &quot;files&quot;: {\n        &quot;fr&quot;: &quot;c55a12e5-a8b4-4195-9dba-41bdd4f1eb56&quot;,\n        &quot;vdf&quot;:&quot;https:\/\/8b887e04-4eb5-46f4-b35f-e466e7723fbe.s3.us-west-1.amazonaws.com\/OriginalMailingAddress-IcV3yPNZKIqD4CsUDuVf6Kt3uKijwZKR.csv&quot;\n      },\n      &quot;option_uuids&quot;: [\n        &quot;2e53e1ae-5a15-42a2-8661-c1f8663f00bc&quot;,\n        &quot;a1d764a6-1355-4b37-afbd-cf186e4c01a7&quot;,\n        &quot;991b850a-6643-48d3-afa6-bcda4cf58c85&quot;,\n        &quot;1abab393-e3e7-4af3-ad86-9ffa71c18d29&quot;,\n        &quot;6f4fd47a-f70f-4f3d-84f8-a78ef9a62a5a&quot;,\n        &quot;af66174e-4aa4-41ab-8fea-5dc8d7acbf65&quot;,\n        &quot;1e8116af-acfc-44b1-83dc-8181aa338834&quot;,\n        &quot;d3cc0d54-e72f-41ce-80c5-e8486bf2cdb8&quot;,\n        &quot;6ffd6a6d-cd1d-47db-abab-670a2a6c8628&quot;\n      ],\n      &quot;direct_mailing&quot;: {\n        &quot;crid&quot;:&quot;325235&quot;,\n        &quot;address_validation_level&quot;: &quot;none&quot;\n      },\n      &quot;bypass_address_validation&quot;: &quot;true&quot;\n    }\n  ],\n  &quot;payment&quot;: {\n    &quot;profile_token&quot;: &quot;XXXXXXXXX&quot;\n  }\n}\n\n<\/pre>\n<h3>Sample Response<\/h3>\n<p>JSON<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">{\n    &quot;order_status&quot;: &quot;Success&quot;,\n    &quot;customer_order_id&quot;: &quot;direct-mail-072624&quot;,\n    &quot;job_ids&quot;: {\n        &quot;X4674081817-001&quot;: {\n            &quot;customer_job_id&quot;: &quot;direct-mail-4&quot;,\n            &quot;status&quot;: 200,\n            &quot;messages&quot;: []\n        }\n    },\n    &quot;payment_response&quot;: {\n        &quot;payment_uuid&quot;: &quot;2e8201a0-8fe3-422b-a554-3434isds&quot;,\n        &quot;payment_provider&quot;: {\n            &quot;payment_provider_uuid&quot;: &quot;a026b55c-4e33-4a35-80eb-sjdhj3hj&quot;,\n            &quot;payment_provider&quot;: &quot;DummyProvider&quot;,\n            &quot;created_at&quot;: &quot;2023-08-16 18:22:32.340083-07&quot;,\n            &quot;updated_at&quot;: &quot;2023-08-16 18:22:32.340083-07&quot;,\n            &quot;deleted_at&quot;: null\n        },\n        &quot;requested_amount&quot;: &quot;138.95&quot;,\n        &quot;requested_refund_amount&quot;: null,\n        &quot;requested_currency&quot;: {\n            &quot;currency_code&quot;: &quot;USD&quot;,\n            &quot;currency&quot;: &quot;United States dollar&quot;,\n            &quot;currency_number&quot;: &quot;840&quot;,\n            &quot;created_at&quot;: &quot;2013-09-30 09:27:22.689216-07&quot;,\n            &quot;updated_at&quot;: null,\n            &quot;deleted_at&quot;: null\n        },\n        &quot;request_transaction_code&quot;: null,\n        &quot;request_data&quot;: &quot;&quot;,\n        &quot;requested_at&quot;: &quot;2024-10-01T15:37:03+00:00&quot;,\n        &quot;response_transaction_code&quot;: &quot;55450a80-677e-470f-ac61-uausahgsva&quot;,\n        &quot;response_data&quot;: null,\n        &quot;responded_at&quot;: &quot;2024-10-01T15:37:03+00:00&quot;,\n        &quot;authorization_code&quot;: null,\n        &quot;authorized_at&quot;: &quot;2024-10-01T15:37:03+00:00&quot;,\n        &quot;authorized_payment_amount&quot;: &quot;138.95&quot;,\n        &quot;authorized_refund_amount&quot;: 0,\n        &quot;authorized_currency&quot;: {\n            &quot;currency_code&quot;: &quot;USD&quot;,\n            &quot;currency&quot;: &quot;United States dollar&quot;,\n            &quot;currency_number&quot;: &quot;840&quot;,\n            &quot;created_at&quot;: &quot;2013-09-30 09:27:22.689216-07&quot;,\n            &quot;updated_at&quot;: null,\n            &quot;deleted_at&quot;: null\n        },\n        &quot;paying_organization&quot;: {\n            &quot;organization_uuid&quot;: &quot;bf972465-d0b2-4767-b350-wewsd3r3443dd&quot;,\n            &quot;organization_name&quot;: &quot;4over-test&quot;,\n            &quot;organization_description&quot;: &quot;4over-test&quot;,\n            &quot;job_code_prefix&quot;: &quot;Z&quot;,\n            &quot;is_public_organization&quot;: true,\n            &quot;primary_contact_user&quot;: {\n                &quot;user_uuid&quot;: &quot;6bc4fd59-839d-41ce-a32c-34fefd45f&quot;,\n                &quot;first_name&quot;: &quot;Test&quot;,\n                &quot;last_name&quot;: &quot;api&quot;,\n                &quot;email&quot;: &quot;v-testuser@4over.com&quot;,\n                &quot;user_notes&quot;: &quot;&quot;,\n                &quot;created_at&quot;: &quot;2022-03-03 12:55:01.328992-08&quot;,\n                &quot;updated_at&quot;: &quot;2022-03-03 12:55:01.328992-08&quot;,\n                &quot;deleted_at&quot;: &quot;&quot;,\n                &quot;organizations&quot;: &quot;https:\/\/sandbox-api.4over.com\/users\/6bc4fd59-839d-41ce-a32c-0acb04073ccf\/organizations&quot;,\n                &quot;logins&quot;: &quot;https:\/\/sandbox-api.4over.com\/users\/6bc4fd59-839d-41ce-a32c-wasdda4da2b1\/logins&quot;,\n                &quot;token&quot;: &quot;0911bdb7f48c0d0f58a9de3b19877faad0581856&quot;,\n                &quot;timestamp&quot;: &quot;0.92753600 1727797023&quot;,\n                &quot;current_organization_uuid&quot;: &quot;bf972465-d0b2-4767-b350-sdshjh33443&quot;\n            },\n            &quot;parent_organization&quot;: {\n                &quot;organization_uuid&quot;: &quot;d6d4e03e-7e88-4f69-9664-wasdda4da2b1&quot;,\n                &quot;organization_name&quot;: &quot;API&quot;,\n                &quot;organization_description&quot;: &quot;API Subsciber Organizations&quot;,\n                &quot;job_code_prefix&quot;: &quot;&quot;,\n                &quot;is_public_organization&quot;: true,\n                &quot;primary_contact_user&quot;: &quot;&quot;\n            }\n        },\n        &quot;paying_user&quot;: {\n            &quot;user_uuid&quot;: &quot;6as4fd59-839d-41ce-a32c-asxasfdasas&quot;,\n            &quot;first_name&quot;: &quot;4overqasource&quot;,\n            &quot;last_name&quot;: &quot;api&quot;,\n            &quot;email&quot;: &quot;v-testest@4over.com&quot;,\n            &quot;user_notes&quot;: &quot;&quot;,\n            &quot;created_at&quot;: &quot;2022-03-03 12:55:01.328992-08&quot;,\n            &quot;updated_at&quot;: &quot;2022-03-03 12:55:01.328992-08&quot;,\n            &quot;deleted_at&quot;: &quot;&quot;,\n            &quot;organizations&quot;: &quot;https:\/\/sandbox-api.4over.com\/users\/6as4fd59-839d-41ce-a32c-wasdda4da2b1\/organizations&quot;,\n            &quot;logins&quot;: &quot;https:\/\/sandbox-api.4over.com\/users\/6as4fd59-839d-41ce-a32c-wasdda4da2b1\/logins&quot;,\n            &quot;token&quot;: &quot;1c2777fcb8dbecd63202ccca0e5cc23afd158a5f&quot;,\n            &quot;timestamp&quot;: &quot;0.92760100 1727797023&quot;,\n            &quot;current_organization_uuid&quot;: &quot;bf972465-d0b2-4767-b350-c3728c8cd6f5&quot;\n        },\n        &quot;created_at&quot;: &quot;2024-10-01T15:37:03+00:00&quot;,\n        &quot;updated_at&quot;: null,\n        &quot;deleted_at&quot;: null\n    },\n    &quot;payment_type&quot;: &quot;authnet&quot;,\n    &quot;errors&quot;: []\n}<\/pre>\n<p>**If there are any failed jobs, the response will show either &#8220;Warning&#8221; or &#8220;Failed&#8221; for &#8220;order_status&#8221; and will appear as shown below:<\/p>\n<p>If \u00a0&#8220;order_status&#8221; is Warning or Failed, you have jobs that did not go through. \u00a0Jobs in the &#8220;job_ids&#8221; array are the Successful jobs and do not need to get sent again. \u00a0Any jobs in the &#8220;errors&#8221; array DO need to get fixed and resent to the order API.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n{\n &quot;order_status&quot;: &quot;Warning&quot;,\n &quot;job_ids&quot;: [\n    {\n        &quot;internal_id&quot;: &quot;X6327136040-001&quot;,\n        &quot;customer_job_id&quot;: &quot;93cc6db6-acd7-11e6-8635-0242ac110003-corporate&quot;\n    }\n ],\n....\n....\n&quot;errors&quot;: [\n    {\n       &quot;customer_order_id&quot;: &quot;123456&quot;,\n       &quot;customer_job_id&quot;: &quot;YOUR_JOB_ID&quot;,\n       &quot;internal_id&quot;: &quot;Z12345678&quot;,\n       &quot;message&quot;: &quot;ERROR MESSAGE WILL GO HERE&quot;,\n       &quot;job_status&quot;: &quot;Failed&quot;\n     }\n  ]\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>POST New Orders This route submits a new Direct Mail order and places it in User&#8217;s shopping cart. An order is consisted of one or more jobs. Each job is constructed by series of UUIDs and shipping data. Ship_from address is required when a job is drop-shipped. All files must be identified by appropriate file-reason [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":935,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-901","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/901","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=901"}],"version-history":[{"count":9,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/901\/revisions"}],"predecessor-version":[{"id":912,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/901\/revisions\/912"}],"up":[{"embeddable":true,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/935"}],"wp:attachment":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}