Api problem occurs!

I am doing an Api integration with GLS and everything works great until line 125. Code works but the problem occurs on line125 adePreparingBox_GetConsign. Says something is wrong with id.

How to solve this? Here is the link to GLS manual

ERROR: [[err_cons_not_found] id: 6417 in C:xampphtdocsGlsApiglsapi.php:125*

  <?php

    $hClient = new SoapClient( 'had to hide it' );
    $oCredit = new stdClass();
    $oCredit->user_name="had to hide it";
    $oCredit->user_password = 'had to hide it';
    
    $oClient = $hClient->adeLogin( $oCredit );
    $szSession = $oClient->return->session;
    
    print_r( $oClient );
    
    ***Not sure if I need to put "new stdClass();" in every method???***
    
    
    /*               boxinsert                   */
    $oCons = new stdClass();
    $oCons->session = $szSession;
    $oCons->consign_prep_data = new stdClass();
    $oCons->consign_prep_data->rname1 = 'Pan (1)';
    $oCons->consign_prep_data->rname2 = 'Jan (2)';
    $oCons->consign_prep_data->rname3 = 'Kowalski (3)';
    $oCons->consign_prep_data->rcountry = 'PL';
    $oCons->consign_prep_data->rzipcode="00-950";
    $oCons->consign_prep_data->rcity = 'Warszawa';
    $oCons->consign_prep_data->rstreet="ul. Mordor 15";
    
    $oCons->consign_prep_data->rphone="(48) 000-000-000";
    $oCons->consign_prep_data->rcontact="test@domain.eu";
    
    $oCons->consign_prep_data->references="by api2: 2014.09.01";
    $oCons->consign_prep_data->notes="add. note";
    $oCons->consign_prep_data->weight = 1.2;
    $oCons->consign_prep_data->quantity = 1; // overwrited by ParcelsArray
    
    
       
    
    $oCons->consign_prep_data->srv_bool = new stdClass();
    $oCons->consign_prep_data->srv_bool->cod = 1;
    $oCons->consign_prep_data->srv_bool->cod_amount = 57;
    
    
    
    
    $oCons->consign_prep_data->parcels = new stdClass();
    $oParcel = new stdClass();
    $oParcel->reference="Ref. parc01";
    $oParcel->weight="1.11";
    $oCons->consign_prep_data->parcels->items[] = $oParcel;
    
    $oParcel = new stdClass();
    $oParcel->reference="Ref. parc02";
    $oParcel->weight="1.22";
    $oCons->consign_prep_data->parcels->items[] = $oParcel;
    
    $oParcel = new stdClass();
    $oParcel->reference="Ref. parc03";
    $oParcel->weight="1.33";
    $oCons->consign_prep_data->parcels->items[] = $oParcel;
    
    
    $oClient = $hClient->adePreparingBox_Insert( $oCons );
    
    print_r( $oClient );
    
    /*                  getAllowed               */
    
    $cSess = new stdClass();
    $cSess->session = $szSession;
    $oClient = $hClient->adeServices_GetAllowed( $cSess );
    
    print_r( $oClient );
    
     /*                GetMaxCod                 */
    
      $cSess = new stdClass();
     $cSess->session = $szSession;
     $oClient = $hClient->adeServices_GetMaxCOD( $cSess );
    
     print_r( $oClient );
    
    
     /*           GetMaxParcelWeights            */
     $cSess = new stdClass();
     $cSess->session = $szSession;
     $oClient = $hClient->adeServices_GetMaxParcelWeights( $cSess );
    
     print_r( $oClient );
    
     /*             adeZip_GetCity                  */
    
    
     $oInput = new stdClass();
     $oInput->session = $szSession;
     $oInput->country = 'PL';
     $oInput->zipcode="61-138";
     $oClient = $hClient->adeZip_GetCity( $oInput );
    
    
     print_r( $oClient );
    
    
    
    
    
    /*                    Get Ids                    */
     $oInput = new stdClass();
     $oInput->session = $szSession;
     $oInput->id_start = 6211;
     $oClient = $hClient->adePreparingBox_GetConsignIDs( $oInput );
    
     print_r( $oClient );
    
    
     /*                  Get Consign                 */
    
     $oInput = new stdClass();
     $oInput->session = $szSession;
     $oInput->id = 6417;
     $oClient = $hClient->adePreparingBox_GetConsign( $oInput );
    <br>
    *Here in this line the problem occurs*
    
    
    /*               Get consign Labels              */
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id = 6415;
    $oInput->mode="roll_160x100_zebra_epl";
    $oClient = $hClient->adePreparingBox_GetConsignLabels( $oInput );
    $szLabels = base64_decode( $oClient->return->labels );
    
    print_r( substr( $szLabels, 0, 16 ) );
    
    
    
    /*                 Delete Consign                 */
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id = 6411;
    $oClient = $hClient->adePreparingBox_DeleteConsign( $oInput );
    
    print_r( $oClient );
    
    
    /*                Pickup Crate                     */
    
    
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->consigns_ids = new stdClass();
    $oInput->consigns_ids->items[] = 6304;
    $oInput->consigns_ids->items[] = 6303;
    $oInput->desc="Le grand test du API2";
    $oClient = $hClient->adePickup_Create( $oInput );
    
    print_r( $oClient );
    
    
    
    /*                 PIckup Get Ids                     */
    
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id_start = 0;
    $oClient = $hClient->adePickup_GetIDs( $oInput );
    
    print_r( $oClient );
    
    
    /*                Detailed GetData                     */
    
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id = 376;
    $oClient = $hClient->adePickup_Get( $oInput );
    
    print_r( $oClient );
    
    
    
    /*This method allows to retrieve Consigmnet IDs from given Pickup Receipt ID. It retrieves no more than 100 IDs sorted in descending order.*/
    
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id = 373;
    $oInput->id_start = 0;
    $oClient = $hClient->adePickup_GetConsignIDs( $oInput );
    
    print_r( $oClient );
    
    /*Parcels on Pickup Receipt having different ID than when they were on parcel list.*/
    
    
    $oInput =  new stdClass();
    $oInput->session =  $szSession;
    $oInput->id =   4487988;
    $oClient =   $hClient->adePickup_GetConsign( $oInput );
    
    print_r( $oClient );
    
    
    /*                       Get Receipt                             */
    
    
    
    $oInput =     new stdClass();
    $oInput->session =     $szSession;
    $oInput->id =   373;
    $oInput->mode="with_barcodes";
    $oClient = $hClient->adePickup_GetReceipt( $oInput );
    $szReceipt = base64_decode( $oClient->return->receipt );
    
    print_r( substr( $szReceipt, 0, 16 ) );
    
    
    
    
    
    /*                          Get Label                       */
    
    $oInput = new stdClass();
    $oInput->session =    $szSession;
    $oInput->id = 373;
    $oInput->mode="four_labels_on_a4_pdf";
    $oClient = $hClient->adePickup_GetLabels( $oInput );
    $szLabels = base64_decode( $oClient->return->labels );
    
    print_r( substr( $szLabels, 0, 16 ) );
    
    
    /*                     Get Consign Lables                    */
    
    
    
    $oInput = new stdClass();
    $oInput->session = $szSession;
    $oInput->id = 4487988;
    $oClient = $hClient->adePickup_GetConsign( $oInput );
    
    print_r( $oClient );
    
    
    
    /*                   Parcel Number Search                     */
    
    $oInput =     new stdClass();
    $oInput->session =     $szSession;
    $oInput->number="62020000022";
    $oClient =     $hClient->adePickup_ParcelNumberSearch( $oInput );
    
    print_r( $oClient );
    
    
    
    /*LOGOUT*/
    $oSess = new stdClass();
    $oSess->session = $szSession;
    $oClient = $hClient->adeLogout( $oSess );
    
    ?>

here is a screenshot of an error that occurs the output should return a pdf with order information

Domenk is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

6