Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
8aafa44
add server var for tenant ID
jeff-matthews Jul 17, 2025
fe2993e
optimize security schemes
jeff-matthews Jul 17, 2025
dc22fe3
get credential for openapi specs
jeff-matthews Jul 18, 2025
f8cd006
fix: replaced ACCS with ACO
jeff-matthews Jul 18, 2025
5ce556d
fix: long description
jeff-matthews Jul 18, 2025
1e72f8b
Revert "fix: long description"
jeff-matthews Jul 18, 2025
36be64e
move original spec to static dir
jeff-matthews Jul 18, 2025
3686ac9
added stage project template ID for testing
jeff-matthews Jul 28, 2025
314eef9
Merge branch 'develop' into test-playground
jeff-matthews Jul 28, 2025
d15772b
Merge branch 'develop' into test-playground
jeff-matthews Jul 29, 2025
58c908b
Delete src/pages/optimizer/data-ingestion/api-reference.md
meker12 Aug 1, 2025
a8bd9f0
Delete src/pages/optimizer/merchandising-services/api-reference.md
meker12 Aug 1, 2025
4fd9a65
Merge branch 'main' into test-playground
jeff-matthews Aug 4, 2025
c6dff73
Merge branch 'main' into test-playground
jeff-matthews Aug 4, 2025
ed4a06c
remove unnecessary heading
jeff-matthews Aug 4, 2025
769963d
initial attempt at guidance for retrieving tenant ID
jeff-matthews Aug 4, 2025
b2dacea
refine help message for finding tenant ID
jeff-matthews Aug 4, 2025
8f64dc6
remove server description
jeff-matthews Aug 4, 2025
7b05fe1
add styling to tenant ID help
jeff-matthews Aug 4, 2025
c70576d
replaced securitySchemes w/ parameters for better UX
jeff-matthews Aug 4, 2025
0800f79
Revert "replaced securitySchemes w/ parameters for better UX"
jeff-matthews Aug 4, 2025
4dd1cef
change target server to stage
jeff-matthews Aug 4, 2025
7b4aa3c
separate bearer auth security from API key and IMS org ID parameters
jeff-matthews Aug 4, 2025
19395dd
replace security scheme with parameters again
jeff-matthews Aug 4, 2025
d7491f0
fix: use consistent case
jeff-matthews Aug 4, 2025
440d895
removed api key and IMS org ID headers
jeff-matthews Aug 5, 2025
23481c0
replace credential detail with tenant ID guidance
jeff-matthews Aug 5, 2025
77a5f4e
test: access token heading
jeff-matthews Aug 5, 2025
dc663f5
fix: add scopes
jeff-matthews Aug 5, 2025
d53a698
fix: restore client ID and IMS org ID (partially)
jeff-matthews Aug 5, 2025
7aa102c
fix: add orderby for client Id and IMS org ID
jeff-matthews Aug 5, 2025
31ccb32
clarify token use
jeff-matthews Aug 5, 2025
452ba01
clarify copy token
jeff-matthews Aug 5, 2025
1a13e23
fix: access token return console error
jeff-matthews Aug 5, 2025
68ee975
fix: credential return for client id
jeff-matthews Aug 5, 2025
4fe3751
simplfy component text
jeff-matthews Aug 5, 2025
0a409bc
fix: remove br tags that render as plaintext
jeff-matthews Aug 5, 2025
c178ae7
wordsmithing
jeff-matthews Aug 5, 2025
f0b77d0
separate tenant ID from client and org ID
jeff-matthews Aug 5, 2025
5b2b42f
Apply suggestions from code review
jeff-matthews Aug 6, 2025
df810ee
Apply suggestions from code review
jeff-matthews Aug 6, 2025
232373a
normalize review suggestions for new and return
jeff-matthews Aug 6, 2025
a014f2a
fix: editorial
jeff-matthews Aug 6, 2025
009df3b
fix: case
jeff-matthews Aug 6, 2025
1db7b80
Apply suggestions from code review
jeff-matthews Aug 6, 2025
3707fee
fix: normalize return credential block with review suggestions
jeff-matthews Aug 6, 2025
01fdc04
fix: normalize return credential block with review suggestions
jeff-matthews Aug 6, 2025
e100548
fix: remove redundant sentence
jeff-matthews Aug 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src/openapi/.redocly.yaml

This file was deleted.

171 changes: 171 additions & 0 deletions src/pages/credential/GetCredentialOAuthS2s.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
import React from 'react'
import { GetCredential } from '@adobe/gatsby-theme-aio/src/components/GetCredential';
import commerce from "./images/commerce.svg";

const GetCredentialOAuthS2s = () => {

return (

<GetCredential className="getCredentialContainer" templateId="6887db51a6867b6202ef2f9c" productName='Adobe Commerce Optimizer' >

<GetCredential.SignIn title="Get credentials" paragraph="After signing in, you can create credentials that can be used to call the Commerce APIs." buttonText="Sign in" />

<GetCredential.Form title="Get credentials" paragraph="Create credentials that you can use to call the Commerce APIs." className="formClass">

<GetCredential.Form.CredentialName label="Credential name" description="The credential name must be unique, use alphanumeric characters, and between 6 and 45 characters long. A project will be automatically created with the same name in Adobe Developer Console." range="45" />

<GetCredential.Form.Products label="Included products and services">
<GetCredential.Form.Product label="Adobe Commerce Optimizer" icon={commerce} />
</GetCredential.Form.Products>

<GetCredential.Form.AdobeDeveloperConsole label='By checking this box, you agree to' linkText="Adobe Developer Terms of Use" href="https://wwwimages2.adobe.com/content/dam/cc/en/legal/servicetou/Adobe-Developer-Additional-Terms_en-US_20230822.pdf" />

<GetCredential.Form.Side>
<div style={{ display: "flex", gap: "32px", flexDirection: "column" }}>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
OAuth server-to-server credential
</h3>
<p className="spectrum-Body spectrum-Body--sizeM">
This credential allows you to use industry standard OAuth2.0 libraries to generate access tokens using the OAuth 2.0 client credentials grant type.
</p>
</div>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
Learn more
</h3>
<a style={{ color: "#0265DC" }} href="https://developer.adobe.com/commerce/webapi/rest/authentication/">
Authentication documentation
</a>
</div>
</div>
</GetCredential.Form.Side>

</GetCredential.Form>

<GetCredential.UnknownError helpLink="https://some_help_link" helpLinkText="Get Help" className="unKnownError" />

<GetCredential.Card title="Your credential is ready to use" developerConsoleManage="Manage on Developer Console" className="card_developer_console" devConsoleDirection="/console" isCollapsable="true">

<GetCredential.Card.Side>
<div style={{ display: "flex", gap: "32px", flexDirection: "column" }}>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
OAuth server-to-server credential
</h3>
<p className="spectrum-Body spectrum-Body--sizeM">
This credential allows you to use industry standard OAuth2.0 libraries to generate access tokens using the OAuth 2.0 client credentials grant type.
</p>
</div>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
Learn more
</h3>
<a style={{ color: "#0265DC" }} href="https://developer.adobe.com/commerce/webapi/rest/authentication/">
Authentication documentation
</a>
</div>
</div>
</GetCredential.Card.Side>

<GetCredential.Card.Products label="Included products and services">
<GetCredential.Card.Product label="Adobe Commerce Optimizer" icon={commerce} />
</GetCredential.Card.Products>

<GetCredential.Card.ProjectsDropdown label="Projects" subHeading="Only your projects that contain credentials are shown" />

<GetCredential.Card.ManageDeveloperConsole label="Manage all your projects and credentials on Adobe Developer Console" direction='/console' />

<GetCredential.Card.DevConsoleLink heading="Developer Console Project" />

<GetCredential.Card.AccessToken helpText="" buttonLabel="Generate and copy token" heading={(<>Access token<br/><br/> <span style="font-weight:normal"><small>After copying the access token, you must prepend the token with <code>Bearer</code> to use it with API calls.</small></span></>)} />


<GetCredential.Card.CredentialDetails heading={(<>Credential details<br/><br/> <span style="font-weight:normal"><small>You can use the following credential details to try out the Adobe Commerce Optimizer REST API below.<ul><li>Client ID: Your public identifier for accessing the API. This acts as an API key when used with the Commerce APIs, and corresponds with the <code>x-api-key</code> header.</li><li>Organization ID: The ID of the organization you're using with the Commerce APIs. This corresponds with the <code>x-gw-ims-org-id</code> header.</li></ul></small></span></>)} orderBy="ClientId,ImsOrgID">
<GetCredential.Card.CredentialDetails.ClientId heading="Client ID (x-api-key)" />
<GetCredential.Card.CredentialDetails.ImsOrgID heading="Organization ID" />
<GetCredential.Card.CredentialDetails.Scopes heading="Scopes" scope="openid,session,AdobeID,read_organizations,additional_info.projectedProductContext" />
</GetCredential.Card.CredentialDetails>

</GetCredential.Card>

<GetCredential.Return title="Previously created projects" paragraph="Select a project and access your existing credentials for Adobe Commerce Optimizer." className="card_developer_console" isCollapsable="true">

<GetCredential.Return.Side>
<GetCredential.Return.Side.Custom>
<div style={{ display: "flex", gap: "30px", flexDirection: "column", width: "100%" }}>
<h3 className='spectrum-Heading spectrum-Heading--sizeM'>Welcome back</h3>
<p className="spectrum-Body spectrum-Body--sizeM">You can either re-use an existing credential or create a new credential.</p>
</div>
</GetCredential.Return.Side.Custom>
<GetCredential.Return.Side.NewCredential heading="Need another credential?" buttonLabel="Create new credential" />
</GetCredential.Return.Side>

<GetCredential.Return.CredentialDetails heading={(<>Credential details<br/><br/> <span style="font-weight:normal"><small>You can use the following credential details to try out the Adobe Commerce Optimizer REST API below.<ul><li>Client ID: Your public identifier for accessing the API. This acts as an API key when used with the Platform APIs, and corresponds with the <code>x-api-key</code> header.</li><li>Organization ID: The ID of the organization you're using with the Commerce APIs. This corresponds with the <code>x-gw-ims-org-id</code> header.</li></ul></small></span></>)} orderBy="ClientId,ImsOrgID">
<GetCredential.Return.CredentialDetails.ClientId heading="Client ID (x-api-key)" />
<GetCredential.Return.CredentialDetails.ImsOrgID heading="Organization ID" />
<GetCredential.Return.CredentialDetails.Scopes heading="Scopes" scope="openid,session,AdobeID,read_organizations,additional_info.projectedProductContext" />
</GetCredential.Return.CredentialDetails>

<GetCredential.Return.ProjectsDropdown label="Projects" subHeading="Only your projects that contain credentials are shown" />

<GetCredential.Return.ManageDeveloperConsole label="Manage all your projects and credentials on Adobe Developer Console" direction='/console/projects' />

<GetCredential.Return.AccessToken helpText="" buttonLabel="Generate and copy token" heading={(<>Access token<br/><br/> <span style="font-weight:normal"><small>After copying the access token, you must prepend the token with <code>Bearer</code> to use it with API calls.</small></span></>)} />

<GetCredential.Return.DevConsoleLink heading="Developer Console project" />

<GetCredential.Return.Products label="Included products and services">
<GetCredential.Return.Product label="Adobe Commerce Optimizer" icon={commerce} />
</GetCredential.Return.Products>

</GetCredential.Return>

<GetCredential.RequestAccess
title="Get credentials"
paragraph="Create unique credentials that you will use to call multiple APIs from your application."
>
<GetCredential.RequestAccess.EdgeCase>
<GetCredential.RequestAccess.EdgeCase.NoProduct title="Your organization does not have access to Adobe Commerce Optimizer." />
<GetCredential.RequestAccess.EdgeCase.Type1User title="You do not have access to Adobe Commerce Optimizer. Please use another organization and try again." />
<GetCredential.RequestAccess.EdgeCase.NotMember title="You do not have access to Adobe Commerce Optimizer. Please use another organization and try again." />
</GetCredential.RequestAccess.EdgeCase>

<GetCredential.RequestAccess.RestrictedAccess
title="Restricted Access"
buttonLabel="Request access"
>
<GetCredential.RequestAccess.RestrictedAccess.Products label="Included products and services">
<GetCredential.RequestAccess.RestrictedAccess.Products.Product
icon={commerce}
label="Adobe Commerce Optimizer"
/>
</GetCredential.RequestAccess.RestrictedAccess.Products>
</GetCredential.RequestAccess.RestrictedAccess>
<GetCredential.RequestAccess.RequestAccessSide>
<div style={{ display: "flex", gap: "32px", flexDirection: "column" }}>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
OAuth server-to-server credential
</h3>
<p className="spectrum-Body spectrum-Body--sizeM">
This credential allows you to use industry standard OAuth2.0 libraries to generate access tokens using the OAuth 2.0 client credentials grant type.
</p>
</div>
<div style={{ display: "flex", gap: "16px", flexDirection: "column" }}>
<h3 className="spectrum-Heading spectrum-Heading--sizeS side-header">
Learn more
</h3>
<a style={{ color: "#0265DC" }} href="https://developer.adobe.com/commerce/webapi/rest/authentication/">
Authentication documentation
</a>
</div>
</div>
</GetCredential.RequestAccess.RequestAccessSide>
</GetCredential.RequestAccess>
</GetCredential>

)
}

export default GetCredentialOAuthS2s;
1 change: 1 addition & 0 deletions src/pages/credential/images/commerce.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions src/pages/optimizer/data-ingestion/api-reference.md

This file was deleted.

11 changes: 0 additions & 11 deletions src/pages/optimizer/merchandising-services/api-reference.md

This file was deleted.

6 changes: 5 additions & 1 deletion src/pages/reference/rest/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ keywords:
layout: none
---

import GetCredentialOAuthS2s from '/src/pages/credential/GetCredentialOAuthS2s.js'

<GetCredentialOAuthS2s />

# API Reference

<RedoclyAPIBlock src="https://raw.githubusercontent.com/AdobeDocs/commerce-services/refs/heads/ccdm-early-access/src/openapi/data-ingestion-schema-v1.yaml" scrollYOffset={64} />
<RedoclyAPIBlock src='/commerce/services/rest/data-ingestion-schema-v1.yaml' />
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ info:
- <strong>[Price books](#tag/Price-Books)</strong>—define and manage pricing scopes for different customer tiers and markets.
- <strong>[Prices](#tag/Prices)</strong>—define and manage product SKU prices and their associated price books.
version: 1.0.0
security:
- apiKeyAuth: []
- bearerAuth: []
- imsOrgAuth: []
servers:
- url: https://na1-sandbox.api.commerce.adobe.com/<TENANT_ID>
description: Production endpoint. The TENANT_ID value is the identifier of the Adobe Commerce instance. See [Adobe Commerce Cloud Manager](https://experience.adobe.com/#/commerce/cloud-service/instances) to see your available instances.
- url: https://na1-sandbox.api.commerce.adobe.com/{tenantId}
description: Production endpoint. The tenantId value is the identifier of the Adobe Commerce instance. See [Adobe Commerce Cloud Manager](https://experience.adobe.com/#/commerce/cloud-service/instances) to see your available instances.
variables:
tenantId:
description: The identifier of the Adobe Commerce instance
default: your-tenant-id

tags:
- name: Metadata
Expand Down Expand Up @@ -184,7 +192,6 @@ paths:
operationId: createProductMetadata
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -301,7 +308,6 @@ paths:
operationId: updateProductMetadata
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -352,7 +358,6 @@ paths:
operationId: deleteProductMetadata
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -486,7 +491,6 @@ paths:
operationId: createProducts
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -891,7 +895,6 @@ paths:
operationId: updateProducts
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1056,7 +1059,6 @@ paths:
operationId: deleteProducts
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1102,7 +1104,6 @@ paths:
operationId: createPriceBooks
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1152,7 +1153,6 @@ paths:
operationId: updatePriceBooks
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1196,7 +1196,6 @@ paths:
operationId: deletePriceBooks
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1262,7 +1261,6 @@ paths:
operationId: createPrices
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1418,7 +1416,6 @@ paths:
operationId: updatePrices
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1486,7 +1483,6 @@ paths:
operationId: deletePrices
parameters:
- $ref: "#/components/parameters/ContentType"
- $ref: "#/components/parameters/Authorization"
- $ref: "#/components/parameters/ContentEncoding"
responses:
"200":
Expand Down Expand Up @@ -1514,6 +1510,21 @@ paths:
value: [{ "sku": "red-pants", "priceBookId": "dealer-north" }]

components:
securitySchemes:
apiKeyAuth:
type: apiKey
in: header
name: x-api-key
description: API key for authentication
bearerAuth:
type: http
scheme: bearer
description: Bearer token for authorization
imsOrgAuth:
type: apiKey
in: header
name: x-gw-ims-org-id
description: Adobe IMS organization ID
responses:
AcceptedResponse:
x-summary: All items accepted
Expand Down Expand Up @@ -1573,13 +1584,7 @@ components:
schema:
type: string
enum: [application/json]
Authorization:
name: Authorization
in: header
required: true
schema:
type: string
description: Authorization Bearer token

ContentEncoding:
name: Content-Encoding
in: header
Expand Down