{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown","redocly_category":"Guides","api_domain":"Cross API"},"seo":{"title":"Orderby query parameter","description":"How to sort Sales Layer REST API responses with the $orderby query parameter.","keywords":["Sales Layer","REST API","OpenAPI","DAM API","Catalog API","product catalog API","image management API","API integration"],"lang":"en-US","meta":[{"name":"og:type","content":"website"},{"name":"og:site_name","content":"Sales Layer REST API Documentation"},{"name":"og:title","content":"Sales Layer REST API Documentation"},{"name":"og:description","content":"Complete REST API documentation for Sales Layer's DAM and Catalog APIs. Learn authentication, pagination, filtering, and integration patterns."},{"name":"twitter:card","content":"summary_large_image"},{"name":"twitter:site","content":"@saleslayer"},{"name":"twitter:title","content":"Sales Layer REST API Documentation"},{"name":"twitter:description","content":"Complete REST API documentation for Sales Layer's DAM and Catalog APIs. Learn authentication, pagination, filtering, and integration patterns."}],"llmstxt":{"hide":false,"title":"Sales Layer REST API Documentation","description":"Technical guides and OpenAPI references for Sales Layer DAM and Catalog REST APIs.","sections":[{"title":"Guides","description":"Static API guides for authentication, headers, query parameters, responses, rate limiting, and best practices.","includeFiles":["guides/**/*.md","changelog.md"],"excludeFiles":[]},{"title":"API Reference","description":"OpenAPI-based references and API overview pages for Sales Layer REST APIs.","includeFiles":["apis/**/*.md","apis/**/*.yaml"],"excludeFiles":[]},{"title":"Postman collections","description":"Importable Postman collection and environment instructions for testing Sales Layer REST APIs.","includeFiles":["postman/**/*.md"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"orderby","__idx":0},"children":["Orderby"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$orderby"]}," to sort returned resources by one or more supported properties."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The current OpenAPI specifications document ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$orderby"]}," for DAM list operations and several Catalog list and changelog operations."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"syntax","__idx":1},"children":["Syntax"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"text","header":{"controls":{"copy":{}}},"source":"$orderby=PROPERTY_NAME asc\n$orderby=PROPERTY_NAME desc\n","lang":"text"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the direction is omitted, the API may apply its default sort direction. Specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["asc"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}," explicitly when result order matters."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"examples","__idx":2},"children":["Examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sort Catalog products:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/catalog/rest/Catalog/Products?$select=prod_ref,prod_title&$orderby=prod_ref asc\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sort DAM images:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://api2.saleslayer.com/dam/image?$orderby=createdOn desc\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"supported-properties","__idx":3},"children":["Supported properties"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sortable properties depend on the endpoint and resource."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For Catalog resources, check the corresponding metadata endpoint and the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/catalog-v2.0"},"children":["Catalog endpoint reference"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For DAM images, check the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/dam-v2.0"},"children":["DAM endpoint reference"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"notes","__idx":4},"children":["Notes"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Sorting is documented for root resource properties."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use stable sorting with pagination to avoid duplicated or missing records in long-running reads."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Avoid sorting by fields that are not documented as supported by the target endpoint."]}]}]},"headings":[{"value":"Orderby","id":"orderby","depth":1},{"value":"Syntax","id":"syntax","depth":2},{"value":"Examples","id":"examples","depth":2},{"value":"Supported properties","id":"supported-properties","depth":2},{"value":"Notes","id":"notes","depth":2}],"frontmatter":{"seo":{"title":"Orderby query parameter","description":"How to sort Sales Layer REST API responses with the $orderby query parameter."},"keywords":{"includes":["$orderby","sorting","query parameters"]},"metadata":{"redocly_category":"Guides","api_domain":"Cross API"}},"lastModified":"2026-06-03T15:57:05.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/orderby","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}