# API key scopes A scope is permission for one kind of call. When you create an API key in the REVER dashboard, you choose its scopes, and the key can call only the endpoints those scopes cover. Keys created before scopes existed have full access and keep working as they are. ## What happens without the scope The call is refused with `403 Forbidden`, and the message names the scope it needed: ``` missing scope: process:comment ``` A key's scopes cannot be edited. To change them, create a new key with the scopes you need and delete the old one. ## Choosing scopes Create one key per integration and give it only what that integration calls. If a key leaks, it can do only what that integration does, and you can delete it without touching the others. Some common setups: | Integration | Scopes | | --- | --- | | Helpdesk (Gorgias, Zendesk) | Returns: Read, Add comments | | Warehouse system | Returns: Read, Warehouse reviews, Restock items. Logistics: Read | | AI support agent | Returns: Read, Add comments. Logistics: Update shipping status | | BI or reporting tool | Analytics: Read | ## Every scope ### Returns #### Read: `process:read` See returns: details, summaries, lists and exports, their transactions, reviews, documents and restocks, and the previews to check before changing a refund method or cancelling an exchange. 25 endpoints: - `GET /v1/ecommerce/restock-locations` - `POST /v1/processes/carriers` - `POST /v1/processes/countries` - `GET /v1/processes/ecommerce/{platform_process_id}` - `POST /v1/processes/export` - `POST /v1/processes/export-csv` - `GET /v1/processes/helpdesk/find/{email}/{group}` - `POST /v1/processes/line_items/return_reasons` - `POST /v1/processes/list` - `GET /v1/processes/logistics/summaries` - `GET /v1/processes/summaries` - `POST /v1/processes/warehouses` - `POST /v1/processes/wfp/claims/get-by-return-process-id` - `GET /v1/processes/{process_id}` - `GET /v1/processes/{process_id}/authorization_status` - `GET /v1/processes/{process_id}/cancel-exchange-preview` - `GET /v1/processes/{process_id}/documents` - `GET /v1/processes/{process_id}/full` - `GET /v1/processes/{process_id}/logistics` - `GET /v1/processes/{process_id}/review` - `GET /v1/processes/{process_id}/reviews` - `GET /v1/processes/{process_id}/transactions` - `GET /v1/restocks/{process_id}` - `GET /v1/update/returns/{process_id}/available_refund_method_change_options` - `GET /v1/update/returns/{process_id}/calculate_update` #### Create returns: `process:create` Create returns through the API. 3 endpoints: - `POST /v1/inditex/{ecommerce_id}/allocated_timing_id/derive` - `POST /v1/inditex/{ecommerce_id}/process` - `POST /v1/inditex/{ecommerce_id}/refund_methods/calculate` #### Add comments: `process:comment` Add a comment to a return. 1 endpoint: - `POST /v1/processes/{process_id}/comment` #### Request photos: `process:request_photos` Send the customer an email asking for more photos of the returned items. 1 endpoint: - `POST /v1/processes/{process_id}/request_photos` #### Authorize returns: `process:authorize` Approve or reject a return that is waiting for your authorization, and optionally change the refund amount. 1 endpoint: - `POST /v1/ops/submit_authorization` #### Warehouse reviews: `process:review` Send the result of the warehouse review: which units arrived, and whether each is approved, rejected or missing. The review decides the refund. 5 endpoints: - `POST /v1/ops/ecommerce/review` - `POST /v1/ops/review` - `POST /v1/ops/review_by_order_sku` - `POST /v1/processes/{process_id}/approve_all` - `POST /v1/processes/{process_id}/review` #### Restock items: `process:restock` Put returned items back in stock in your store. 1 endpoint: - `POST /v1/ops/restock` #### Change refund method: `process:change_refund_method` Change how an existing return is refunded, for example from the original payment method to a gift card. 1 endpoint: - `POST /v1/update/returns/{process_id}/update` #### Add transactions: `process:transactions` Add transactions and adjustments to a return. 2 endpoints: - `POST /v1/processes/{process_id}/adjustment` - `POST /v1/processes/{process_id}/transactions` #### Mark as refunded: `process:mark_as_refunded` Tell REVER that your store refunded the customer itself. 1 endpoint: - `POST /v1/ops/mark_as_refunded_externally` #### Change status: `process:update_status` Move a return to another workflow status. 1 endpoint: - `POST /v1/processes/{process_id}/worfklow_status` #### Cancel returns: `process:cancel` Cancel a return. It cannot be undone. 2 endpoints: - `POST /v1/ops/cancel` - `POST /v1/update/returns/{process_id}/cancel` #### Edit returns: `process:update` Change any field of a return in one call, including the customer's address. This is the broadest access to returns: give it only to an integration you fully trust. 1 endpoint: - `PATCH /v1/processes/{process_id}/patch` ### Logistics #### Read: `logistics:read` See logistics orders, pickups and labels, and check whether a pickup is available. 4 endpoints: - `GET /v1/logistics/orders/{order_id}` - `POST /v1/logistics/pickup/available` - `GET /v1/logistics/process-info/{process_id}` - `GET /v1/logistics/{process_id}/presigned_url_label` #### Create shipments and pickups: `logistics:create` Create logistics orders and pickups, and register orders created outside REVER. 3 endpoints: - `POST /v1/logistics/orders` - `PUT /v1/logistics/orders` - `POST /v1/logistics/pickup` #### Update shipping status: `logistics:update_shipping_status` Set the shipping status of a return, for example when your carrier reports it in transit or delivered. `transition_lkss` applies only valid moves; `update_lkss` writes any status. 2 endpoints: - `POST /v1/ops/transition_lkss` - `POST /v1/ops/update_lkss` #### Change carrier: `logistics:change_carrier` Change the provider and carrier a return ships with. 1 endpoint: - `POST /v1/processes/{process_id}/logistics` #### Set store address: `logistics:set_store_address` Set the store address of an in-store return. 1 endpoint: - `POST /v1/processes/{process_id}/store_address` ### Analytics #### Read: `analytics:read` Return rates, reports, sizing insights and the analytics assistant. 31 endpoints: - `POST /v1/analytics/classify_free_text_ticket` - `GET /v1/analytics/dashboard_referrals/{ecommerce_group}` - `POST /v1/analytics/ecommerce/{ecommerce_id}/chat` - `GET /v1/analytics/get_ai_insights` - `GET /v1/analytics/invoicing_copies` - `GET /v1/analytics/invoicing_info_by_stripe_customer` - `GET /v1/analytics/reports` - `GET /v1/analytics/scope/portals` - `GET /v1/analytics/sizing/cycle/{store_id}` - `GET /v1/analytics/sizing/cycles/{store_id}` - `GET /v1/analytics/sizing/models/{store_id}` - `GET /v1/analytics/sizing/models/{store_id}/{model_key}` - `GET /v1/analytics/sizing/overview/{store_id}` - `GET /v1/analytics/wrongly_sized_products/tab/{store_id}` - `GET /v1/analytics/{ecommerce_id}/available_filters` - `GET /v1/analytics/{ecommerce_id}/invoicing_info` - `GET /v1/analytics/{ecommerce_id}/period_return_rate` - `GET /v1/analytics/{ecommerce_id}/problematic_products` - `GET /v1/analytics/{ecommerce_id}/product_analytics/detail_view` - `GET /v1/analytics/{ecommerce_id}/products` - `GET /v1/analytics/{ecommerce_id}/products/main_view` - `GET /v1/analytics/{ecommerce_id}/products/{product_id}/return_rate` - `GET /v1/analytics/{ecommerce_id}/products/{product_id}/return_rate/countries` - `GET /v1/analytics/{ecommerce_id}/return_rate_table` - `GET /v1/analytics/{ecommerce_id}/return_rate_table/countries` - `GET /v1/analytics/{ecommerce_id}/returns_analytics/main_view` - `GET /v1/analytics/{ecommerce_id}/returns_analytics/returns_by_country` - `GET /v1/analytics/{ecommerce_id}/returns_analytics/types_by_day` - `GET /v1/analytics/{ecommerce_id}/returns_analytics/upsell` - `GET /v1/analytics/{store_id}/products/{product_id}/return_rate/store_level` - `GET /v1/analytics/{store_id}/products/{product_id}/returns_by_country` ### Store settings #### Read: `settings:read` Return and exchange conditions, branding, warehouses, workflows, contacts and copies. 37 endpoints: - `GET /v1/analytics/integrations` - `GET /v1/analytics/integrations/status` - `GET /v1/analytics/integrations/{integration_name}/details` - `GET /v1/businessrules/ecommerce/{ecommerce_id}/returnamount` - `GET /v1/businessrules/ecommerce/{ecommerce_id}/returnamount-available` - `GET /v1/configs/branding/{ecommerce_id}` - `GET /v1/configs/contacts/{ecommerce_id}` - `GET /v1/configs/ecommerce/{ecommerce_id}` - `GET /v1/configs/ecommerces/{ecommerce_id}/dynamicwarehouse` - `GET /v1/configs/ecommerces/{ecommerce_id}/warehouses` - `GET /v1/configs/ecommerces/{ecommerce_id}/warehouses/config` - `GET /v1/configs/exchangeconditions/{ecommerce_id}` - `GET /v1/configs/exchangeorders/{ecommerce_id}` - `GET /v1/configs/group-contacts/{ecommerce_group}` - `GET /v1/configs/instoresettings/{ecommerce_id}` - `GET /v1/configs/logisticsetting/{ecommerce_id}` - `GET /v1/configs/product-automations/ecommerce/{ecommerce_id}` - `GET /v1/configs/product-automations/ecommerces/{ecommerce_id}/flattened` - `GET /v1/configs/refunds` - `GET /v1/configs/returnconditions/{ecommerce_id}` - `GET /v1/configs/risk-exposure-settings/{ecommerce_id}` - `GET /v1/configs/warehouses/{id}` - `GET /v1/configs/webhooks/ecommerce/{ecommerce_id}/subscriptions` - `GET /v1/configs/workflowconfigurations/{ecommerce_id}` - `GET /v1/ecommerce/{ecommerce_id}/catalog` - `GET /v1/ecommerce/{ecommerce_id}/stores` - `GET /v2/configs/ecommerces/{ecommerce_id}/exchanges` - `GET /v2/configs/ecommerces/{ecommerce_id}/refunds` - `GET /v2/configs/ecommerces/{ecommerce_id}/return-conditions` - `GET /v2/configs/ecommerces/{ecommerce_id}/return-reasons` - `GET /v2/configs/ecommerces/{ecommerce_id}/warehouses/config` - `GET /v2/configs/groups/{ecommerce_group}/exchanges` - `GET /v2/configs/groups/{ecommerce_group}/refunds` - `GET /v2/configs/groups/{ecommerce_group}/return-conditions` - `GET /v2/configs/groups/{ecommerce_group}/return-reasons` - `GET /v2/configs/groups/{ecommerce_group}/warehouses` - `GET /v2/configs/groups/{ecommerce_group}/warehouses/config` #### Write: `settings:write` Change that configuration. 41 endpoints: - `POST /v1/businessrules/ecommerce/{ecommerce_id}/returnamount` - `PATCH /v1/configs/branding` - `POST /v1/configs/branding` - `POST /v1/configs/branding/image` - `POST /v1/configs/contacts` - `POST /v1/configs/ecommerce` - `POST /v1/configs/ecommerces/warehouses/config` - `POST /v1/configs/exchangeconditions` - `POST /v1/configs/exchangeorders` - `POST /v1/configs/group-contacts` - `POST /v1/configs/instoresettings` - `POST /v1/configs/logisticsetting` - `POST /v1/configs/product-automations/ecommerce` - `POST /v1/configs/product-automations/utils/add_section` - `POST /v1/configs/product-automations/utils/add_setting` - `POST /v1/configs/refunds` - `POST /v1/configs/return-reasons` - `PATCH /v1/configs/returnconditions` - `POST /v1/configs/returnconditions` - `POST /v1/configs/risk-exposure-settings` - `POST /v1/configs/warehouses` - `PUT /v1/configs/webhooks/ecommerce/{ecommerce_id}/subscriptions` - `POST /v1/configs/workflowconfigurations` - `PUT /v1/copies` - `POST /v2/configs/ecommerces/{ecommerce_id}/exchanges` - `DELETE /v2/configs/ecommerces/{ecommerce_id}/exchanges/overrides` - `POST /v2/configs/ecommerces/{ecommerce_id}/refunds` - `DELETE /v2/configs/ecommerces/{ecommerce_id}/refunds/override` - `POST /v2/configs/ecommerces/{ecommerce_id}/return-conditions` - `DELETE /v2/configs/ecommerces/{ecommerce_id}/return-conditions/override` - `POST /v2/configs/ecommerces/{ecommerce_id}/return-reasons` - `DELETE /v2/configs/ecommerces/{ecommerce_id}/return-reasons/override` - `POST /v2/configs/ecommerces/{ecommerce_id}/warehouses/config` - `DELETE /v2/configs/ecommerces/{ecommerce_id}/warehouses/config/override` - `POST /v2/configs/groups/{ecommerce_group}/exchanges` - `POST /v2/configs/groups/{ecommerce_group}/refunds` - `POST /v2/configs/groups/{ecommerce_group}/return-conditions` - `POST /v2/configs/groups/{ecommerce_group}/return-reasons` - `POST /v2/configs/groups/{ecommerce_group}/warehouses` - `POST /v2/configs/groups/{ecommerce_group}/warehouses/config` - `POST /v2/configs/groups/{ecommerce_group}/warehouses/delete` ### Credentials > **Sensitive**: a key with these scopes reaches your store platform and your carriers, not only REVER. #### Read: `credentials:read` Your platform and carrier credentials, partner connections and webhook signing secrets. 10 endpoints: - `GET /v1/configs/credentials/{ecommerce_id}` - `GET /v1/configs/integrations/nango/connections` - `GET /v1/configs/integrations/nango/groups/{group}/connections` - `GET /v1/configs/logistics/connections/carriers` - `GET /v1/configs/logistics/connections/partners` - `GET /v1/configs/webhooks/ecommerce/{ecommerce_id}/signing-secret` - `GET /v1/configs/webhooks/ecommerce/{ecommerce_id}/signing-secrets` - `GET /v1/ecommerce/custom-platform/credentials` - `GET /v1/ecommerce/custom-platform/credentials/by-shop-id/{shop_id}` - `GET /v1/ecommerce/salesforce/credentials/{ecommerce_id}` #### Write: `credentials:write` Change them, or connect a platform. 15 endpoints: - `POST /v1/analytics/integrations/save` - `POST /v1/configs/credentials` - `POST /v1/configs/integrations/nango/connect-session` - `POST /v1/configs/integrations/nango/connections` - `DELETE /v1/configs/integrations/nango/connections/{integration}/{connection_id}` - `DELETE /v1/configs/integrations/nango/groups/{group}/connections/{integration}/{connection_id}` - `POST /v1/configs/integrations/nango/groups/{group}/connections/{integration}/{connection_id}/check` - `POST /v1/configs/integrations/nango/groups/{group}/connections/{integration}/{connection_id}/reconnect-session` - `PUT /v1/configs/integrations/nango/platform-connection` - `POST /v1/configs/logistics/connections/carriers` - `DELETE /v1/configs/logistics/connections/carriers/{id}` - `POST /v1/configs/logistics/connections/partners` - `DELETE /v1/configs/logistics/connections/partners/{id}` - `DELETE /v1/configs/webhooks/ecommerce/{ecommerce_id}/signing-secret` - `POST /v1/configs/webhooks/ecommerce/{ecommerce_id}/signing-secret`