Module: Printful
- Defined in:
- lib/printful_client/version.rb,
lib/printful_client.rb,
lib/printful_client/api_error.rb,
lib/printful_client/api_client.rb,
lib/printful_client/models/file.rb,
lib/printful_client/models/gift.rb,
lib/printful_client/models/item.rb,
lib/printful_client/models/costs.rb,
lib/printful_client/models/order.rb,
lib/printful_client/models/state.rb,
lib/printful_client/models/store.rb,
lib/printful_client/configuration.rb,
lib/printful_client/models/option.rb,
lib/printful_client/models/paging.rb,
lib/printful_client/models/profit.rb,
lib/printful_client/models/address.rb,
lib/printful_client/models/country.rb,
lib/printful_client/models/product.rb,
lib/printful_client/models/variant.rb,
lib/printful_client/models/webhook.rb,
lib/printful_client/models/category.rb,
lib/printful_client/models/material.rb,
lib/printful_client/models/product1.rb,
lib/printful_client/models/shipment.rb,
lib/printful_client/models/tax_info.rb,
lib/printful_client/models/template.rb,
lib/printful_client/models/file_type.rb,
lib/printful_client/models/item_info.rb,
lib/printful_client/models/printfile.rb,
lib/printful_client/models/templates.rb,
lib/printful_client/models/size_table.rb,
lib/printful_client/models/statistics.rb,
lib/printful_client/models/file_option.rb,
lib/printful_client/models/item_option.rb,
lib/printful_client/models/measurement.rb,
lib/printful_client/models/option_type.rb,
lib/printful_client/models/order_costs.rb,
lib/printful_client/models/order_event.rb,
lib/printful_client/models/response200.rb,
lib/printful_client/models/tax_request.rb,
lib/printful_client/models/address_info.rb,
lib/printful_client/models/packing_slip.rb,
lib/printful_client/models/product_info.rb,
lib/printful_client/models/retail_costs.rb,
lib/printful_client/models/sync_product.rb,
lib/printful_client/models/sync_variant.rb,
lib/printful_client/models/variant_info.rb,
lib/printful_client/models/webhook_info.rb,
lib/printful_client/models/shipping_info.rb,
lib/printful_client/api/o_auth_api_client.rb,
lib/printful_client/api/orders_api_client.rb,
lib/printful_client/models/approval_sheet.rb,
lib/printful_client/models/printfile_info.rb,
lib/printful_client/models/printful_costs.rb,
lib/printful_client/models/template_by_id.rb,
lib/printful_client/api/catalog_api_client.rb,
lib/printful_client/api/reports_api_client.rb,
lib/printful_client/api/webhook_api_client.rb,
lib/printful_client/models/generation_task.rb,
lib/printful_client/models/incomplete_item.rb,
lib/printful_client/models/product_variant.rb,
lib/printful_client/api/products_api_client.rb,
lib/printful_client/api/tax_rate_api_client.rb,
lib/printful_client/models/item_files_inner.rb,
lib/printful_client/models/product_template.rb,
lib/printful_client/models/store_statistics.rb,
lib/printful_client/models/tax_address_info.rb,
lib/printful_client/models/measurement_value.rb,
lib/printful_client/models/pricing_breakdown.rb,
lib/printful_client/models/sync_product_info.rb,
lib/printful_client/models/sync_variant_info.rb,
lib/printful_client/models/total_paid_orders.rb,
lib/printful_client/models/variant_printfile.rb,
lib/printful_client/models/warehouse_product.rb,
lib/printful_client/models/product_size_guide.rb,
lib/printful_client/models/sync_product_event.rb,
lib/printful_client/models/availability_status.rb,
lib/printful_client/models/available_technique.rb,
lib/printful_client/models/catalog_file_option.rb,
lib/printful_client/models/order_shipment_item.rb,
lib/printful_client/api/file_library_api_client.rb,
lib/printful_client/models/add_file200_response.rb,
lib/printful_client/models/generation_task_file.rb,
lib/printful_client/models/order_estimate_costs.rb,
lib/printful_client/models/sync_product_deleted.rb,
lib/printful_client/models/sync_variant_product.rb,
lib/printful_client/api/shipping_rate_api_client.rb,
lib/printful_client/models/costs_by_amount_inner.rb,
lib/printful_client/models/get_store200_response.rb,
lib/printful_client/models/response200_paginated.rb,
lib/printful_client/models/sales_and_costs_inner.rb,
lib/printful_client/models/thread_colors_request.rb,
lib/printful_client/models/approval_sheet_changes.rb,
lib/printful_client/models/costs_by_product_inner.rb,
lib/printful_client/models/costs_by_variant_inner.rb,
lib/printful_client/models/create_generation_task.rb,
lib/printful_client/models/create_webhook_request.rb,
lib/printful_client/models/generation_task_mockup.rb,
lib/printful_client/models/get_orders200_response.rb,
lib/printful_client/models/get_scopes200_response.rb,
lib/printful_client/models/get_stores200_response.rb,
lib/printful_client/models/get_stores403_response.rb,
lib/printful_client/api/approval_sheets_api_client.rb,
lib/printful_client/api/mockup_generator_api_client.rb,
lib/printful_client/models/average_fulfillment_time.rb,
lib/printful_client/models/calculate_shipping_rates.rb,
lib/printful_client/models/create_order200_response.rb,
lib/printful_client/models/get_products200_response.rb,
lib/printful_client/models/get_products401_response.rb,
lib/printful_client/models/get_webhooks200_response.rb,
lib/printful_client/models/template_variant_mapping.rb,
lib/printful_client/api/product_templates_api_client.rb,
lib/printful_client/api/store_information_api_client.rb,
lib/printful_client/models/get_countries200_response.rb,
lib/printful_client/models/get_templates200_response.rb,
lib/printful_client/models/thread_colors200_response.rb,
lib/printful_client/models/warehouse_product_variant.rb,
lib/printful_client/api/country_state_code_api_client.rb,
lib/printful_client/api/warehouse_products_api_client.rb,
lib/printful_client/models/approve_design200_response.rb,
lib/printful_client/models/get_categories200_response.rb,
lib/printful_client/models/get_printfiles200_response.rb,
lib/printful_client/models/get_statistics200_response.rb,
lib/printful_client/models/approval_sheet_webhook_file.rb,
lib/printful_client/models/order_estimate_retail_costs.rb,
lib/printful_client/models/template_by_id_colors_inner.rb,
lib/printful_client/models/template_placement_conflict.rb,
lib/printful_client/models/update_sync_product_request.rb,
lib/printful_client/models/update_sync_variant_request.rb,
lib/printful_client/models/generation_task_extra_mockup.rb,
lib/printful_client/models/get_order_by_id_id_parameter.rb,
lib/printful_client/models/get_stores403_response_error.rb,
lib/printful_client/models/product1_sync_variants_inner.rb,
lib/printful_client/models/generation_task_file_position.rb,
lib/printful_client/models/generation_task_template_file.rb,
lib/printful_client/models/get_product_by_id200_response.rb,
lib/printful_client/models/get_sync_products200_response.rb,
lib/printful_client/models/get_tax_countries200_response.rb,
lib/printful_client/models/get_variant_by_id200_response.rb,
lib/printful_client/models/sales_and_costs_summary_inner.rb,
lib/printful_client/models/template_variant_mapping_item.rb,
lib/printful_client/models/get_category_by_id200_response.rb,
lib/printful_client/models/get_products401_response_error.rb,
lib/printful_client/api/ecommerce_platform_sync_api_client.rb,
lib/printful_client/models/calculate_tax_rates200_response.rb,
lib/printful_client/models/change_packing_slip200_response.rb,
lib/printful_client/models/create_sync_product200_response.rb,
lib/printful_client/models/create_sync_product400_response.rb,
lib/printful_client/models/delete_sync_variant200_response.rb,
lib/printful_client/models/get_approval_sheets200_response.rb,
lib/printful_client/models/template_by_id_placements_inner.rb,
lib/printful_client/models/estimate_order_costs200_response.rb,
lib/printful_client/models/item_files_inner_all_of_position.rb,
lib/printful_client/models/template_by_id_option_data_inner.rb,
lib/printful_client/models/create_generator_task200_response.rb,
lib/printful_client/models/get_product_templates200_response.rb,
lib/printful_client/models/get_warehouse_product200_response.rb,
lib/printful_client/models/approval_sheet_changes_files_inner.rb,
lib/printful_client/models/get_sync_product_by_id200_response.rb,
lib/printful_client/models/get_sync_variant_by_id200_response.rb,
lib/printful_client/models/get_warehouse_products200_response.rb,
lib/printful_client/models/delete_product_template200_response.rb,
lib/printful_client/models/get_sync_product_by_id_id_parameter.rb,
lib/printful_client/models/calculate_shipping_rates200_response.rb,
lib/printful_client/models/get_scopes200_response_all_of_result.rb,
lib/printful_client/models/create_sync_product400_response_error.rb,
lib/printful_client/models/change_packing_slip200_response_result.rb,
lib/printful_client/models/get_product_template_by_id200_response.rb,
lib/printful_client/models/approve_design200_response_all_of_result.rb,
lib/printful_client/models/get_categories200_response_all_of_result.rb,
lib/printful_client/models/get_product_size_guide_by_id200_response.rb,
lib/printful_client/models/get_product_size_guide_by_id404_response.rb,
lib/printful_client/models/get_store_sync_variant_by_id200_response.rb,
lib/printful_client/models/submit_approval_sheet_changes200_response.rb,
lib/printful_client/models/get_tax_countries200_response_result_inner.rb,
lib/printful_client/models/template_by_id_placement_option_data_inner.rb,
lib/printful_client/models/get_category_by_id200_response_all_of_result.rb,
lib/printful_client/models/estimate_order_costs200_response_all_of_result.rb,
lib/printful_client/models/get_product_size_guide_by_id404_response_error.rb,
lib/printful_client/models/update_sync_product_request_sync_variants_inner.rb,
lib/printful_client/models/delete_product_template200_response_all_of_result.rb,
lib/printful_client/models/get_scopes200_response_all_of_result_scopes_inner.rb,
lib/printful_client/models/template_by_id_placement_option_data_inner_options_inner.rb,
lib/printful_client/models/get_tax_countries200_response_result_inner_all_of_states_inner.rb
Overview
#API Documentation | Printful
## About the Printful API The Printful API is a RESTful API, that uses an HTTP protocol for communication. HTTP GET, POST, PUT and DELETE methods are used to access the API resources. ## Requests and responses ### Request endpoint All API requests have to be sent to this URL: “‘ api.printful.com/ “` If you are using a proxy, make sure that all requests have host header set to api.printful.com. ### Request parameters Some mandatory parameters (like object identifiers) must be included in the request URL path “` GET /orders/123 “` Additional parameters can be passed as GET variables: “` GET /orders?offset=10&limit=5 “` For POST and PUT requests, a more complex data structure can be passed as JSON encoded data in the request body: “` POST /orders "recipient":{…,"items":} “` ### Response body The response body is always a JSON object that contains a response status code (identical to the HTTP status code) and the result of the action. If the status code is 200, then the action was successful. “` { "code": 200, //Response status code "result":{ //API method return data //… } } “` Sometimes the response includes paging information to allow to browse larger result sets by adding offset and limit GET parameters to the request URL. “` { "code": 200, //Response status code "result":[ { //Item 11 }, { //Item 12 } ] "paging": { "total": 12, //Total items available "offset": 10, //Items skipped from the beginning "limit": 20 //Number of items per page } } “` ## Error response If the API call is not successful, then the response code is not in the 2xx range and the `result` attribute contains an error description. “` { "code": 404, "result": "Not Found", "error": { "reason": "NotFound", "message": "Not Found" } } “` In general, response codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Printful’s servers. ### Timestamps All timestamps from the API are returned as integers in UNIX timestamp format. ### Rate Limits Printful API has a general rate limit of 120 API calls per minute. Additionally, endpoints that perform resource intensive operations (such as mockup generator) have a lower allowed request limit. # Authentication <!– ReDoc-Inject: <security-definitions> –>
The version of the OpenAPI document: 1.0 Contact: [email protected] Generated by: openapi-generator.tech OpenAPI Generator version: 7.0.0-SNAPSHOT
Defined Under Namespace
Modules: GetOrderByIdIdParameter, GetSyncProductByIdIdParameter Classes: AddFile200Response, Address, AddressInfo, ApiClient, ApiError, ApprovalSheet, ApprovalSheetChanges, ApprovalSheetChangesFilesInner, ApprovalSheetWebhookFile, ApprovalSheetsAPIClient, ApproveDesign200Response, ApproveDesign200ResponseAllOfResult, AvailabilityStatus, AvailableTechnique, AverageFulfillmentTime, CalculateShippingRates, CalculateShippingRates200Response, CalculateTaxRates200Response, CatalogAPIClient, CatalogFileOption, Category, ChangePackingSlip200Response, ChangePackingSlip200ResponseResult, Configuration, Costs, CostsByAmountInner, CostsByProductInner, CostsByVariantInner, Country, CountryStateCodeAPIClient, CreateGenerationTask, CreateGeneratorTask200Response, CreateOrder200Response, CreateSyncProduct200Response, CreateSyncProduct400Response, CreateSyncProduct400ResponseError, CreateWebhookRequest, DeleteProductTemplate200Response, DeleteProductTemplate200ResponseAllOfResult, DeleteSyncVariant200Response, EcommercePlatformSyncAPIClient, EstimateOrderCosts200Response, EstimateOrderCosts200ResponseAllOfResult, File, FileLibraryAPIClient, FileOption, FileType, GenerationTask, GenerationTaskExtraMockup, GenerationTaskFile, GenerationTaskFilePosition, GenerationTaskMockup, GenerationTaskTemplateFile, GetApprovalSheets200Response, GetCategories200Response, GetCategories200ResponseAllOfResult, GetCategoryById200Response, GetCategoryById200ResponseAllOfResult, GetCountries200Response, GetOrders200Response, GetPrintfiles200Response, GetProductById200Response, GetProductSizeGuideById200Response, GetProductSizeGuideById404Response, GetProductSizeGuideById404ResponseError, GetProductTemplateById200Response, GetProductTemplates200Response, GetProducts200Response, GetProducts401Response, GetProducts401ResponseError, GetScopes200Response, GetScopes200ResponseAllOfResult, GetScopes200ResponseAllOfResultScopesInner, GetStatistics200Response, GetStore200Response, GetStoreSyncVariantById200Response, GetStores200Response, GetStores403Response, GetStores403ResponseError, GetSyncProductById200Response, GetSyncProducts200Response, GetSyncVariantById200Response, GetTaxCountries200Response, GetTaxCountries200ResponseResultInner, GetTaxCountries200ResponseResultInnerAllOfStatesInner, GetTemplates200Response, GetVariantById200Response, GetWarehouseProduct200Response, GetWarehouseProducts200Response, GetWebhooks200Response, Gift, IncompleteItem, Item, ItemFilesInner, ItemFilesInnerAllOfPosition, ItemInfo, ItemOption, Material, Measurement, MeasurementValue, MockupGeneratorAPIClient, OAuthAPIClient, Option, OptionType, Order, OrderCosts, OrderEstimateCosts, OrderEstimateRetailCosts, OrderEvent, OrderShipmentItem, OrdersAPIClient, PackingSlip, Paging, PricingBreakdown, Printfile, PrintfileInfo, PrintfulCosts, Product, Product1, Product1SyncVariantsInner, ProductInfo, ProductSizeGuide, ProductTemplate, ProductTemplatesAPIClient, ProductVariant, ProductsAPIClient, Profit, ReportsAPIClient, Response200, Response200Paginated, RetailCosts, SalesAndCostsInner, SalesAndCostsSummaryInner, Shipment, ShippingInfo, ShippingRateAPIClient, SizeTable, State, Statistics, Store, StoreInformationAPIClient, StoreStatistics, SubmitApprovalSheetChanges200Response, SyncProduct, SyncProductDeleted, SyncProductEvent, SyncProductInfo, SyncVariant, SyncVariantInfo, SyncVariantProduct, TaxAddressInfo, TaxInfo, TaxRateAPIClient, TaxRequest, Template, TemplateById, TemplateByIdColorsInner, TemplateByIdOptionDataInner, TemplateByIdPlacementOptionDataInner, TemplateByIdPlacementOptionDataInnerOptionsInner, TemplateByIdPlacementsInner, TemplatePlacementConflict, TemplateVariantMapping, TemplateVariantMappingItem, Templates, ThreadColors200Response, ThreadColorsRequest, TotalPaidOrders, UpdateSyncProductRequest, UpdateSyncProductRequestSyncVariantsInner, UpdateSyncVariantRequest, Variant, VariantInfo, VariantPrintfile, WarehouseProduct, WarehouseProductVariant, WarehouseProductsAPIClient, Webhook, WebhookAPIClient, WebhookInfo
Constant Summary collapse
- VERSION =
'1.0.2'
Class Method Summary collapse
-
.configure ⇒ Object
Customize default settings for the SDK using block.
Class Method Details
.configure ⇒ Object
Customize default settings for the SDK using block.
Printful.configure do |config|
config.username = "xxx"
config.password = "xxx"
end
If no block given, return the default Configuration object.
210 211 212 213 214 215 216 |
# File 'lib/printful_client.rb', line 210 def configure if block_given? yield(Configuration.default) else Configuration.default end end |