> For the complete documentation index, see [llms.txt](https://shoxl.gitbook.io/erp-integration-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shoxl.gitbook.io/erp-integration-guide/2022.4/webservice/matchownarticlenumbers.md).

# MatchOwnArticleNumbers

**Description**

The database of the shop does not contain the customer's own articlenumbers but if this REST API function is implemented the shop can facilitate the use of the customer's own article numbers in the shop's search box.&#x20;

This function can be implemented if the ERP system supports the storage of the customer own article numbers for the articles in the ERP.

The shop will pass on the terms found in search query to the MatchOwnArticleNumbers endpoint. The endpoint checks in the ERP if the terms correspond with the own articlenumbers of the current customer and and returns the matched articlenumbers that are used in the shop. The shop will then complete the search query with this matched/translated articlenumbers. SearchTerms that could not be matched are not returned in the result.

## REST API:

**URL:** /Shoxl/v1/MatchOwnArticleNumbers\
**Method:** POST

**Request body:**

### MatchOwnArticleNumbersRequest{

| accountNumber | <p>string<br>required</p>        | Account number of the customer that is logged in into the shop.                |
| ------------- | -------------------------------- | ------------------------------------------------------------------------------ |
| searchTerms   | <p>\[string] </p><p>required</p> | List of seachterms that may (but does not have to) contain own articlenumbers. |

}

#### Example:

```
{
  "accountNumber": "128",
  "searchTerms": [ "4321", "dummy", "123456789" ]
}
```

###

**Response body:**

### MatchOwnArticleNumbersResult{

| Parameter        | Type                            | Description                                                                |
| ---------------- | ------------------------------- | -------------------------------------------------------------------------- |
| errorCode        | <p>string<br>nullable: true</p> | An error code returned by the ERP system                                   |
| errorDescription | <p>string<br>nullable: true</p> | The error description related to the error code returned by the ERP system |
| matchedArticles  | \[ArticleNumberMatch]           | List of article number matches                                             |

}

### ArticleNumberMatc&#x68;**{**

| Parameter        | Type                            | Description                                                      |
| ---------------- | ------------------------------- | ---------------------------------------------------------------- |
| ownArticleNumber | <p>string<br>nullable: true</p> | Matched own article number                                       |
| articleNumber    | <p>string<br>nullable: true</p> | Article number of the ERP system (that is also used in the shop) |

}&#x20;

#### Example:

```
{
  "errorCode": "string",
  "errorDescription": "string",
  "matchedArticles": [
    {
      "ownArticleNumber": "4321",
      "articleNumber": "90001"
    }.
    {
      "ownArticleNumber": "123456789",
      "articleNumber": "70001"
    }
  ],
}
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shoxl.gitbook.io/erp-integration-guide/2022.4/webservice/matchownarticlenumbers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
