---
# System prepended metadata

title: API - Integration with TRS
tags: [Sinbad, Red, Ecommerce, Sprint 1]

---

# API - Integration with TRS

## Test Scenarios

#### Test Scenario 1
```gherkin
Scenario: As User I want purchase order
Given I log in As Sinbad Red user
When I purchase order
Then Medea API send post http request to TRS
And Medea receive valid success response 200 with body

   
```

#### Test Scenario 2
```gherkin
Scenario:Medea Failed send order to TRS and TRS not handle it
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 500 in body

    
```

#### Test Scenario 3
```gherkin
Scenario:Medea Failed send order to TRS with invalid url
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 404 in body

   
```

#### Test Scenario 4
```gherkin
Scenario:Medea Failed send order to TRS with invalid format
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 400 in body

   
```
#### Test Scenario 5
```gherkin
Scenario:Medea Failed send order to TRS without valid token
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 401 in body
    
```
#### Test Scenario 6
```gherkin
Scenario: As User I want to cancel my order
Given I log in As Sinbad Red user
When I cancel order
Then Medea API send post http request to TRS
And Medea receive valid success response 200 with body

  
```
#### Test Scenario 7
```gherkin
Scenario:Medea Failed send cancel to TRS and TRS not handle it
Given Medea get cancel from customer
When medea send POST request cancel to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 500 in body
  
```
#### Test Scenario 8
```gherkin
Scenario:Medea Failed send order to TRS with invalid url
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 404 in body
```
#### Test Scenario 9
```gherkin
Scenario:Medea Failed send cancel order to TRS with invalid format
Given Medea get cancel order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 400 in body
```
#### Test Scenario 10
```gherkin
Scenario:Medea Failed send order to TRS without valid token
Given Medea get purchase order from customer
When medea send POST request order to TRS
And TRS refuse it
Then TRS send response code 200 with status code error 401 in body
    
```


#### Test Scenario 
```gherkin
Scenario:
    Given
        And
    When
    Then
```



###### tags: `Sprint 1` `Ecommerce` `Red` `Sinbad`