> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/advanced/cegid-y2scripts.md).

# Cegid Y2Scripts

## Get the Cegid Y2 scripts

> Returns every script slot, whether or not it is set: an unset slot has a null \`content\`.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"CegidY2Scripts"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.y2.settings:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"CegidY2ScriptsDefinition":{"required":["advisorRepository","connectionInterceptor","mapper"],"type":"object","properties":{"mapper":{"description":"Adjusts the customer mapping between Y2 and the account, in both directions.","$ref":"#/components/schemas/ExtensionScriptSlot"},"advisorRepository":{"description":"Filters the Y2 salespersons offered as advisors, and optionally projects them.","$ref":"#/components/schemas/ExtensionScriptSlot"},"connectionInterceptor":{"description":"Intercepts the requests sent to Y2 and their responses.","$ref":"#/components/schemas/ExtensionScriptSlot"}},"additionalProperties":false,"description":"The scripts the Cegid Y2 integration can be customised with."},"ExtensionScriptSlot":{"required":["conflictingFileNames","endpointName","fileName"],"type":"object","properties":{"endpointName":{"type":"string","description":"The extensibility endpoint the script implements, as passed to `register(...)`, e.g.\n`extensions.comarch.couponMapper`. Fixed per slot."},"fileName":{"type":"string","description":"Name of the script file backing the slot. Returned even when the file does not exist yet."},"content":{"type":["null","string"],"description":"The script's content. Null when the tenant has no such file."},"conflictingFileNames":{"type":"array","items":{"type":"string"},"description":"Other scripts that register the same endpoint; resolve any entry here so the endpoint has a single\nscript. Empty when there is none."}},"additionalProperties":false,"description":"The state of one script slot, as every extension's scripts endpoint returns it."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cegid/y2/scripts":{"get":{"tags":["CegidY2Scripts"],"summary":"Get the Cegid Y2 scripts","description":"Returns every script slot, whether or not it is set: an unset slot has a null `content`.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Scripts returned.","content":{"text/plain":{"schema":{"description":"The scripts the Cegid Y2 integration can be customised with.","$ref":"#/components/schemas/CegidY2ScriptsDefinition"}},"application/json":{"schema":{"description":"The scripts the Cegid Y2 integration can be customised with.","$ref":"#/components/schemas/CegidY2ScriptsDefinition"}},"text/json":{"schema":{"description":"The scripts the Cegid Y2 integration can be customised with.","$ref":"#/components/schemas/CegidY2ScriptsDefinition"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.y2.settings:read</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Set the Cegid Y2 scripts

> Applies every slot the request carries, or none: a slot left out is untouched, \`{ "content": "…" }\`\
> stores the script as sent, \`{ "content": null }\` removes it, and an empty content is refused.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"CegidY2Scripts"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.y2.settings:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"SetCegidY2ScriptsRequest":{"type":"object","properties":{"mapper":{"description":"Change to Neo.Extensions.Cegid.Controllers.CegidY2ScriptsDefinition.Mapper.","$ref":"#/components/schemas/ScriptSlotUpdate"},"advisorRepository":{"description":"Change to Neo.Extensions.Cegid.Controllers.CegidY2ScriptsDefinition.AdvisorRepository.","$ref":"#/components/schemas/ScriptSlotUpdate"},"connectionInterceptor":{"description":"Change to Neo.Extensions.Cegid.Controllers.CegidY2ScriptsDefinition.ConnectionInterceptor.","$ref":"#/components/schemas/ScriptSlotUpdate"}},"additionalProperties":false,"description":"Changes to the Cegid Y2 scripts. A slot left out is left untouched."},"ScriptSlotUpdate":{"type":"object","properties":{"content":{"type":["null","string"],"description":"The new script content. Null deletes the file."}},"additionalProperties":false,"description":"A change to one script slot."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/cegid/y2/scripts":{"put":{"tags":["CegidY2Scripts"],"summary":"Set the Cegid Y2 scripts","description":"Applies every slot the request carries, or none: a slot left out is untouched, `{ \"content\": \"…\" }`\nstores the script as sent, `{ \"content\": null }` removes it, and an empty content is refused.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The slot changes to apply.","content":{"application/json":{"schema":{"description":"Changes to the Cegid Y2 scripts. A slot left out is left untouched.","$ref":"#/components/schemas/SetCegidY2ScriptsRequest"}},"text/json":{"schema":{"description":"Changes to the Cegid Y2 scripts. A slot left out is left untouched.","$ref":"#/components/schemas/SetCegidY2ScriptsRequest"}},"application/*+json":{"schema":{"description":"Changes to the Cegid Y2 scripts. A slot left out is left untouched.","$ref":"#/components/schemas/SetCegidY2ScriptsRequest"}}},"required":true},"responses":{"204":{"description":"Scripts saved."},"400":{"description":"A slot carries an empty content.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the <c>tenant.y2.settings:write</c> scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after <c>Retry-After</c>.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/advanced/cegid-y2scripts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
