# Source Data
source: https://developer.mastercard.com/eop-admin/documentation/use-cases/sources/index.md

## Get Sources {#get-sources}

The Sources API enables the retrieval of all sources from Mastercard. Aggregators or consumers use these sources during the Merchant creation process. The client should include the source UUID (Universal Unique Identifier) in the Merchant payload. Refer to the [API Reference](https://developer.mastercard.com/eop-admin/documentation/api-reference/index.md) page for further information about each endpoint.

### Prerequisites {#prerequisites}

Refer to the following pre-requisites for the customer to use this endpoint:

* The sources should be manually onboarded with the Mastercard Operations Team.
* The source contract should be created manually if the aggregator has a contract directly with Mastercard.

### Sequence diagram {#sequence-diagram}

Diagram source

### Execution steps {#execution-steps}

1. The Merchant aggregator sends the request to the Source Data API with request parameters:
   * limit - Number of items in the response
   * offset - Number of pages requested
2. Mastercard Gateway validates the client request.
3. Mastercard Gateway routes the GET /sources request to the Source Data API in the case of valid request.
4. The request is validated with the application permissions using the key from the header.
5. The GET /sources request fetches the sources data and sends a paginated response (200).
6. The Source Data API returns a response with a status code of 4XX/5XX in case of an invalid request.

### API structure {#api-structure}


API Reference: `GET /sources`

## Get Source Details {#get-source-details}

The Get Source Details endpoint provides comprehensive information about a specific source, including its associated Publishers and their respective programs. Refer to the [API Reference](https://developer.mastercard.com/eop-admin/documentation/api-reference/index.md) page for further information about each endpoint.

### Prerequisites {#prerequisites-1}

Refer to the following pre-requisites for the customer to use this endpoint:

* The sources should be manually onboarded with the Mastercard Operations Team.
* The source contract should be created manually if the aggregator has a contract directly with Mastercard.

### Sequence diagram {#sequence-diagram-1}

Diagram get-source-details

### Execution steps {#execution-steps-1}

1. The Merchant aggregator sends the request to the Source Data API with request parameters:
   * source_uuid - Source UUID (Universal Unique Identifier) to identify the source.
2. Mastercard Gateway validates the client request.
3. Mastercard Gateway routes the GET /sources/{source_uuid} request to the Source Data API in the case of valid request.
4. The request is validated with the application permissions using the key from the header.
5. The GET /sources/{source_uuid} request fetches the source details and sends a paginated response (200).
6. The Source Data API returns a response with a status code of 4XX/5XX in case of an invalid request.

### API structure {#api-structure-1}


API Reference: `GET /sources/{source_uuid}`

## Next steps {#next-steps}

If the source is not present in the response, contact the Mastercard Operations Team to onboard the source. It is a prerequisite to create Merchants.

Fetch categories from [Category Data](https://developer.mastercard.com/eop-admin/documentation/use-cases/categories/index.md) and create mapping with Mastercard categories.
