{"id":757,"date":"2024-06-07T11:10:12","date_gmt":"2024-06-07T11:10:12","guid":{"rendered":"https:\/\/api-users.4over.com\/?page_id=757"},"modified":"2024-07-18T13:29:02","modified_gmt":"2024-07-18T13:29:02","slug":"retrieve-option-prices","status":"publish","type":"page","link":"https:\/\/api-users.4over.com\/?page_id=757","title":{"rendered":"Option Prices Calculations"},"content":{"rendered":"\n<p>Please see below points and details regarding option_price calculations<br>If (startqty = endqty) this value applies to this distinct runsize<br>If (endqty &gt; startqty) the calculation applies to all runsizes within this range.<br>If (is_flat_fee = True) the value in the &#8220;price&#8221; field is the value for the flat-fee<br>If (is_percentage is True) the value in the &#8220;price&#8221; field is the percentage applied to the product base to calculate the option price.<br>If ((price_per_qty data field is not NULL and is &gt; 0) there is an additional price\/qty charge applied<br><br><strong>General formula:<\/strong><br>If is_percentage is False:&nbsp; Option-price = price + ( (Runsize\/qty) * price_per_qty) )<br>If is_percentage is True:&nbsp;&nbsp; Option-price = price * product-base-price<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Resource URI<\/h3>\n\n\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\nGET \/printproducts\/products\/{product_uuid}\/optiongroups\/{option_group_uuid}\/options\/{option_uuid}\/prices\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Input Parameters<\/h3>\n\n\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\n@param product_uuid {uuid} The UUID of product.\n@param option_group_uuid {uuid} The UUID of Option Group.\n@param option_uuid {uuid} The UUID of Option.\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Request<\/h3>\n\n\n\n<p>html<\/p>\n\n\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\nhttps:\/\/api.4over.com\/printproducts\/products\/3b3dd574-4b7d-47fd-b24e-01468cd937d3\/optiongroups\/254afeea-1fd1-4efb-b5fb-c9c3bf4c13d2\/options\/5d566e05-ffea-4705-a23f-95bd227f1370\/prices\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Sample Response<\/h3>\n\n\n\nJSON\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n{\n    &quot;entities&quot;: [\n        {\n            &quot;option_price_uuid&quot;: &quot;aeec7ed5-1023-4e20-a464-c7ee17321780&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 100,\n            &quot;endqty&quot;: 100,\n            &quot;price&quot;: &quot;19.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;b7fecbf9-08ae-4405-94f4-940b8e2ac2a9&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 250,\n            &quot;endqty&quot;: 250,\n            &quot;price&quot;: &quot;19.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;fc3989a6-4c7b-4eb0-aba3-203dfd55c8d8&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 500,\n            &quot;endqty&quot;: 500,\n            &quot;price&quot;: &quot;21.84&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;c1f49c4e-dd25-433d-ace3-15f8728295cc&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 750,\n            &quot;endqty&quot;: 750,\n            &quot;price&quot;: &quot;22&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;698ca520-4adf-45ae-ac54-6c52bd7571c9&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 1000,\n            &quot;endqty&quot;: 1000,\n            &quot;price&quot;: &quot;23.92&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;241a7d7f-6725-4b94-afda-1fa981d8dec2&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 2500,\n            &quot;endqty&quot;: 2500,\n            &quot;price&quot;: &quot;36.00&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;93d4b1e7-f79f-4bcc-8d06-b8f7e0fdcb67&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 5000,\n            &quot;endqty&quot;: 5000,\n            &quot;price&quot;: &quot;49.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;61c9dbc6-2eb9-474a-a225-61f83fb3a0ed&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 7500,\n            &quot;endqty&quot;: 7500,\n            &quot;price&quot;: &quot;61.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;d503a5b8-923d-4005-afdf-895ef6e88471&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 10000,\n            &quot;endqty&quot;: 10000,\n            &quot;price&quot;: &quot;73.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;04c948fb-8b8a-4b9c-9acf-be21464c07eb&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 15000,\n            &quot;endqty&quot;: 15000,\n            &quot;price&quot;: &quot;100.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;04952ab3-57b9-4397-b10b-ce1e31506f8a&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 20000,\n            &quot;endqty&quot;: 20000,\n            &quot;price&quot;: &quot;115.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;0395f896-b00f-4e0d-8349-8ca62237d409&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 25000,\n            &quot;endqty&quot;: 25000,\n            &quot;price&quot;: &quot;139.50&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;f0a46972-b001-4dd0-87c0-403b2392b35d&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 30000,\n            &quot;endqty&quot;: 30000,\n            &quot;price&quot;: &quot;163&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;1c94c8af-e549-4900-9ac1-09603dee1f37&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 35000,\n            &quot;endqty&quot;: 35000,\n            &quot;price&quot;: &quot;190&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        },\n        {\n            &quot;option_price_uuid&quot;: &quot;290b8744-f92b-48c8-8c64-c801927ed23c&quot;,\n            &quot;option_name&quot;: &quot;Yes Bundles of 50&quot;,\n            &quot;startqty&quot;: 40000,\n            &quot;endqty&quot;: 40000,\n            &quot;price&quot;: &quot;223&quot;,\n            &quot;price_per_qty&quot;: &quot;0&quot;,\n            &quot;is_flat_fee&quot;: true,\n            &quot;qty&quot;: 0,\n            &quot;is_percentage&quot;: false\n        }\n    ],\n    &quot;currentPage&quot;: 1,\n    &quot;maximumPages&quot;: 1\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Please see below points and details regarding option_price calculationsIf (startqty = endqty) this value applies to this distinct runsizeIf (endqty &gt; startqty) the calculation applies to all runsizes within this range.If (is_flat_fee = True) the value in the &#8220;price&#8221; field is the value for the flat-feeIf (is_percentage is True) the value in the &#8220;price&#8221; field [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":86,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-757","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/757","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=757"}],"version-history":[{"count":16,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/757\/revisions"}],"predecessor-version":[{"id":827,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/757\/revisions\/827"}],"up":[{"embeddable":true,"href":"https:\/\/api-users.4over.com\/index.php?rest_route=\/wp\/v2\/pages\/86"}],"wp:attachment":[{"href":"https:\/\/api-users.4over.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}